-
Notifications
You must be signed in to change notification settings - Fork 479
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
configure: Check for membarrier support
Runtime dynamic patching requires cache synchronization. This is best achieved by using the 'MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE' memory barrier. However it was introduced in Linux 4.16. We set a flag indicating whether this membarrier can be used or if libmcount has to rely on other mechanisms (e.g. signals). Signed-off-by: Clément Guidi <cguidi@ciena.com>
- Loading branch information
1 parent
6721fec
commit 4a0abd6
Showing
4 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <linux/membarrier.h> | ||
#include <sys/syscall.h> | ||
#include <unistd.h> | ||
|
||
int main() | ||
{ | ||
syscall(__NR_membarrier, MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE, 0, 0); | ||
syscall(__NR_membarrier, MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE, 0, 0); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters