aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man2/futex.221
1 files changed, 11 insertions, 10 deletions
diff --git a/man2/futex.2 b/man2/futex.2
index 389c25224b..ada96c517d 100644
--- a/man2/futex.2
+++ b/man2/futex.2
@@ -25,18 +25,22 @@ futex \- fast user-space locking
.SH SYNOPSIS
.nf
.PP
-.B #include <linux/futex.h>
-.B #include <stdint.h>
-.B #include <sys/time.h>
+.BR "#include <linux/futex.h>" " /* Definition of " FUTEX_* " constants */"
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
.PP
-.BI "long futex(uint32_t *" uaddr ", int " futex_op ", uint32_t " val ,
-.BI " const struct timespec *" timeout , \
+.BI "long syscall(SYS_futex, uint32_t *" uaddr ", int " futex_op \
+", uint32_t " val ,
+.BI " const struct timespec *" timeout , \
" \fR /* or: \fBuint32_t \fIval2\fP */"
-.BI " uint32_t *" uaddr2 ", uint32_t " val3 );
+.BI " uint32_t *" uaddr2 ", uint32_t " val3 );
.fi
.PP
.IR Note :
-There is no glibc wrapper for this system call; see NOTES.
+glibc provides no wrapper for
+.BR futex (),
+necessitating the use of
+.BR syscall (2).
.SH DESCRIPTION
The
.BR futex ()
@@ -1695,9 +1699,6 @@ and a sixth argument was added in Linux 2.6.7.
.SH CONFORMING TO
This system call is Linux-specific.
.SH NOTES
-Glibc does not provide a wrapper for this system call; call it using
-.BR syscall (2).
-.PP
Several higher-level programming abstractions are implemented via futexes,
including POSIX semaphores and
various POSIX threads synchronization mechanisms