Annotation of src/share/man/man2/ucontext.2, Revision 1.3
1.3 ! martin 1: .\" $NetBSD: ucontext.2,v 1.2 2006/02/25 02:28:55 wiz Exp $
1.1 wiz 2: .\"
3: .\" Copyright (c) 2001 The NetBSD Foundation, Inc.
4: .\" All rights reserved.
5: .\"
6: .\" This code is derived from software contributed to The NetBSD Foundation
7: .\" by Klaus Klein.
8: .\"
9: .\" Redistribution and use in source and binary forms, with or without
10: .\" modification, are permitted provided that the following conditions
11: .\" are met:
12: .\" 1. Redistributions of source code must retain the above copyright
13: .\" notice, this list of conditions and the following disclaimer.
14: .\" 2. Redistributions in binary form must reproduce the above copyright
15: .\" notice, this list of conditions and the following disclaimer in the
16: .\" documentation and/or other materials provided with the distribution.
17: .\"
18: .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19: .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20: .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21: .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22: .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23: .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24: .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25: .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26: .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27: .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28: .\" POSSIBILITY OF SUCH DAMAGE.
29: .\"
30: .Dd June 13, 2001
31: .Dt UCONTEXT 2
32: .Os
33: .Sh NAME
34: .Nm ucontext
35: .Nd user context
36: .Sh SYNOPSIS
37: .In ucontext.h
38: .Sh DESCRIPTION
39: .Nm ucontext_t
40: is a structure type which is used to describe the context of a
41: thread of control within the execution of a process.
42: .Pp
43: .Nm ucontext_t
44: includes the following members:
45: .Bd -literal -offset indent
46: ucontext_t * uc_link
47: sigset_t uc_sigmask
48: stack_t uc_stack
49: mcontext_t uc_mcontext
50: .Ed
51: .Pp
52: The
53: .Fa uc_link
54: member points to the context that will be resumed after the function
55: specified when modifying a context using
56: .Xr makecontext 3
57: has returned.
58: If
59: .Fa uc_link
60: is a null pointer, then the context is the main context,
61: and the process will exit with an exit status of 0 upon return.
62: .Pp
63: The
64: .Fa uc_sigmask
65: member is the set of signals that are blocked when the context is
66: activated.
67: Further information can be found in
68: .Xr sigprocmask 2 .
69: .Pp
70: The
71: .Fa uc_stack
72: member defines the stack used by the context.
73: Further information can be found in
74: .Xr sigaltstack 2 .
75: .Pp
76: The
77: .Fa uc_mcontext
78: member defines the machine state associated with the context;
79: it may consist of general registers, floating point registers
1.2 wiz 80: and other machine-specific information.
1.1 wiz 81: Its description is beyond the scope of this manual page;
82: portable applications should not access this structure member.
83: .Sh SEE ALSO
84: .Xr _exit 2 ,
85: .Xr getcontext 2 ,
86: .Xr setcontext 2 ,
87: .Xr sigaltstack 2 ,
88: .Xr sigprocmask 2 ,
89: .Xr makecontext 3 ,
90: .Xr swapcontext 3
91: .Sh STANDARDS
92: The
93: .Nm ucontext_t
94: type conforms to
95: .St -xsh5 .
96: .Sh HISTORY
97: The
98: .Fn makecontext
99: and
100: .Fn swapcontext
101: functions first appeared in
102: .At V.4 .
CVSweb <webmaster@jp.NetBSD.org>