diff options
Diffstat (limited to 'man3/getcontext.3')
-rw-r--r-- | man3/getcontext.3 | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/man3/getcontext.3 b/man3/getcontext.3 index ef2f35fff..dd152c41b 100644 --- a/man3/getcontext.3 +++ b/man3/getcontext.3 @@ -26,9 +26,9 @@ defined in and the four functions .BR getcontext (), .BR setcontext (), -.BR makecontext (3), +.MR makecontext 3 , and -.BR swapcontext (3) +.MR swapcontext 3 that allow user-level context switching between multiple threads of control within a process. .P @@ -63,14 +63,14 @@ Here points to the context that will be resumed when the current context terminates (in case the current context was created using -.BR makecontext (3)), +.MR makecontext 3 ), .I uc_sigmask is the set of signals blocked in this context (see -.BR sigprocmask (2)), +.MR sigprocmask 2 ), .I uc_stack is the stack used by this context (see -.BR sigaltstack (2)), +.MR sigaltstack 2 ), and .I uc_mcontext is the @@ -93,23 +93,23 @@ A successful call does not return. The context should have been obtained by a call of .BR getcontext (), or -.BR makecontext (3), +.MR makecontext 3 , or received as the third argument to a signal handler (see the discussion of the .B SA_SIGINFO flag in -.BR sigaction (2)). +.MR sigaction 2 ). .P If the context was obtained by a call of .BR getcontext (), program execution continues as if this call just returned. .P If the context was obtained by a call of -.BR makecontext (3), +.MR makecontext 3 , program execution continues by a call to the function .I func specified as the second argument of that call to -.BR makecontext (3). +.MR makecontext 3 . When the function .I func returns, we continue with the @@ -118,7 +118,7 @@ member of the structure .I ucp specified as the first argument of that call to -.BR makecontext (3). +.MR makecontext 3 . When this member is NULL, the thread exits. .P If the context was obtained by a call to a signal handler, @@ -140,7 +140,7 @@ to indicate the error. None defined. .SH ATTRIBUTES For an explanation of the terms used in this section, see -.BR attributes (7). +.MR attributes 7 . .TS allbox; lbx lb lb @@ -163,13 +163,13 @@ citing portability issues, and recommending that applications be rewritten to use POSIX threads instead. .SH NOTES The earliest incarnation of this mechanism was the -.BR setjmp (3)/\c -.BR longjmp (3) +.MR setjmp 3 /\c +.MR longjmp 3 mechanism. Since that does not define the handling of the signal context, the next stage was the -.BR sigsetjmp (3)/\c -.BR siglongjmp (3) +.MR sigsetjmp 3 /\c +.MR siglongjmp 3 pair. The present mechanism gives much more control. On the other hand, @@ -184,18 +184,18 @@ variable won't do since registers are restored. When a signal occurs, the current user context is saved and a new context is created by the kernel for the signal handler. Do not leave the handler using -.BR longjmp (3): +.MR longjmp 3 : it is undefined what would happen with contexts. Use -.BR siglongjmp (3) +.MR siglongjmp 3 or .BR setcontext () instead. .SH SEE ALSO -.BR sigaction (2), -.BR sigaltstack (2), -.BR sigprocmask (2), -.BR longjmp (3), -.BR makecontext (3), -.BR sigsetjmp (3), -.BR signal (7) +.MR sigaction 2 , +.MR sigaltstack 2 , +.MR sigprocmask 2 , +.MR longjmp 3 , +.MR makecontext 3 , +.MR sigsetjmp 3 , +.MR signal 7 |