Skip to content

Commit

Permalink
Bug 1663895: aarch64: define the MEMBARRIER_CMD when they don't exist…
Browse files Browse the repository at this point in the history
…; r=lth

Values taken from the Linux kernel source, and confirmed in Android source's
code.

Differential Revision: https://phabricator.services.mozilla.com/D89581
  • Loading branch information
bnjbvr committed Sep 10, 2020
1 parent 0cfc317 commit 19ddbbf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/src/jit/arm64/vixl/MozCpu-vixl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ static int membarrier(int cmd, int flags) {
return syscall(__NR_membarrier, cmd, flags);
}

// These definitions come from the Linux kernel source, for kernels before 4.16
// which didn't have access to these membarrier commands.
# ifndef MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE
# define MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE (1 << 5)
# endif

# ifndef MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE
# define MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE (1 << 6)
# endif

#endif // __aarch64__

namespace vixl {
Expand Down

0 comments on commit 19ddbbf

Please sign in to comment.