--- src/lib/libc/gen/ucontext.3 2006/07/22 18:49:25 1.5 +++ src/lib/libc/gen/ucontext.3 2007/01/16 07:16:23 1.6 @@ -33,7 +33,7 @@ .\" THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/gen/ucontext.3,v 1.1.2.1 2002/09/15 00:30:45 archie Exp $ +.\" $FreeBSD: src/lib/libc/gen/ucontext.3,v 1.3 2004/07/03 22:30:08 ru Exp $ .\" $DragonFly$ .\" .Dd September 10, 2002 @@ -57,40 +57,53 @@ blocked signals. The .Vt ucontext_t structure contains at least these fields: -.Bl -tag -compact -offset 3n -width "mcontext_t uc_mcontext" .Pp -.It "ucontext_t *uc_link" -Context to assume when this one returns -.It "sigset_t uc_sigmask" -Signals being blocked -.It "stack_t uc_stack" -Stack area -.It "mcontext_t uc_mcontext" -Saved registers +.Bl -tag -width ".Va mcontext_t\ \ uc_mcontext" -offset 3n -compact +.It Va "ucontext_t *uc_link" +context to assume when this one returns +.It Va "sigset_t uc_sigmask" +signals being blocked +.It Va "stack_t uc_stack" +stack area +.It Va "mcontext_t uc_mcontext" +saved registers .El .Pp The -.Fa uc_link +.Va uc_link field points to the context to resume when this context's entry point function returns. If -.Fa uc_link +.Va uc_link is equal to .Dv NULL , then the process exits when this context returns. .Pp The -.Fa uc_mcontext +.Va uc_mcontext field is machine-dependent and should be treated as opaque by portable applications. +.Pp +The following functions are defined to manipulate +.Vt ucontext_t +structures: +.Pp +.Bl -item -offset 3n -compact +.It +.Ft int +.Fn getcontext "ucontext_t *" ; +.It +.Ft int +.Fn setcontext "const ucontext_t *" ; +.It +.Ft void +.Fn makecontext "ucontext_t *" "void \*[lp]*\*[rp]\*[lp]void\*[rp]" int ... ; +.It +.Ft int +.Fn swapcontext "ucontext_t *" "const ucontext_t *" ; +.El .Sh SEE ALSO -.Xr sigaltstack 2 -.Sh BUGS -The -.Fn getcontext , -.Fn setcontext , -.Fn makecontext , -and -.Fn swapcontext -functions are not yet implemented in this version of +.Xr sigaltstack 2 , +.Xr getcontext 3 , +.Xr makecontext 3 .Dx .