summaryrefslogtreecommitdiffstats
path: root/man2/futex.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/futex.2')
-rw-r--r--man2/futex.234
1 files changed, 17 insertions, 17 deletions
diff --git a/man2/futex.2 b/man2/futex.2
index 3eed74412..d39ecf006 100644
--- a/man2/futex.2
+++ b/man2/futex.2
@@ -43,7 +43,7 @@ Standard C library
glibc provides no wrapper for
.BR futex (),
necessitating the use of
-.BR syscall (2).
+.MR syscall 2 .
.SH DESCRIPTION
The
.BR futex ()
@@ -72,9 +72,9 @@ All futex operations are governed by this value.
In order to share a futex between processes,
the futex is placed in a region of shared memory,
created using (for example)
-.BR mmap (2)
+.MR mmap 2
or
-.BR shmat (2).
+.MR shmat 2 .
(Thus, the futex word may have different
virtual addresses in different processes,
but these addresses all refer to the same location in physical memory.)
@@ -138,7 +138,7 @@ lock state to not acquired and then execute a futex
operation that wakes threads blocked on the lock flag used as a futex word
(this can be further optimized to avoid unnecessary wake-ups).
See
-.BR futex (7)
+.MR futex 7
for more detail on how to use futexes.
.P
Besides the basic wait and wake-up futex functionality, there are further
@@ -413,10 +413,10 @@ The caller must close the returned file descriptor after use.
When another process or thread performs a
.B FUTEX_WAKE
on the futex word, the file descriptor indicates as being readable with
-.BR select (2),
-.BR poll (2),
+.MR select 2 ,
+.MR poll 2 ,
and
-.BR epoll (7)
+.MR epoll 7
.IP
The file descriptor can be used to obtain asynchronous notifications: if
.I val
@@ -576,7 +576,7 @@ and when the woken waiter unlocks A then the next waiter can proceed.
This operation was added to support some user-space use cases
where more than one futex must be handled at the same time.
The most notable example is the implementation of
-.BR pthread_cond_signal (3),
+.MR pthread_cond_signal 3 ,
which requires operations on two futexes,
the one used to implement the mutex and the one used in the implementation
of the wait queue associated with the condition variable.
@@ -882,7 +882,7 @@ If the lock is not acquired, the futex word's value shall be 0.
If the lock is acquired, the futex word's value shall
be the thread ID (TID;
see
-.BR gettid (2))
+.MR gettid 2 )
of the owning thread.
.IP \[bu]
If the lock is owned and there are threads contending for the lock,
@@ -1077,7 +1077,7 @@ the enqueueing of the waiter is in descending priority order.
and
.B SCHED_RR
scheduling policies in
-.BR sched (7).)
+.MR sched 7 .)
The owner inherits either the waiter's CPU bandwidth
(if the waiter is scheduled under the
.B SCHED_DEADLINE
@@ -1358,7 +1358,7 @@ operation.
In the event of an error (and assuming that
.BR futex ()
was invoked via
-.BR syscall (2)),
+.MR syscall 2 ),
all operations return \-1 and set
.I errno
to indicate the error.
@@ -1523,7 +1523,7 @@ A
or
.B FUTEX_WAIT_BITSET
operation was interrupted by a signal (see
-.BR signal (7)).
+.MR signal 7 ).
Before Linux 2.6.22, this error could also be returned for
a spurious wakeup; since Linux 2.6.22, this no longer happens.
.TP
@@ -1926,11 +1926,11 @@ main(int argc, char *argv[])
.\" SRC END
.SH SEE ALSO
.ad l
-.BR get_robust_list (2),
-.BR restart_syscall (2),
-.BR pthread_mutexattr_getprotocol (3),
-.BR futex (7),
-.BR sched (7)
+.MR get_robust_list 2 ,
+.MR restart_syscall 2 ,
+.MR pthread_mutexattr_getprotocol 3 ,
+.MR futex 7 ,
+.MR sched 7
.P
The following kernel source files:
.IP \[bu] 3