From 6da4ee914739e999b3f38db15f5c97c534160548 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Thu, 10 Sep 2020 23:13:43 +0200 Subject: [PATCH] membarrier.2: Note that glibc does not provide a wrapper Notes: I copied .nf and .fi from futex.2, but they made no visual difference. What do they actually do? Signed-off-by: Alejandro Colomar Signed-off-by: Michael Kerrisk --- man2/membarrier.2 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/man2/membarrier.2 b/man2/membarrier.2 index 8825de71e..f65c6be5c 100644 --- a/man2/membarrier.2 +++ b/man2/membarrier.2 @@ -26,9 +26,15 @@ .SH NAME membarrier \- issue memory barriers on a set of threads .SH SYNOPSIS +.nf +.PP .B #include .PP .BI "int membarrier(int " cmd ", int " flags ");" +.fi +.PP +.IR Note : +There is no glibc wrapper for this system call; see NOTES. .SH DESCRIPTION The .BR membarrier () @@ -270,6 +276,9 @@ Examples where .BR membarrier () can be useful include implementations of Read-Copy-Update libraries and garbage collectors. +.PP +Glibc does not provide a wrapper for this system call; call it using +.BR syscall (2). .SH EXAMPLES Assuming a multithreaded application where "fast_path()" is executed very frequently, and where "slow_path()" is executed infrequently, the