Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ _lwp_makecontext(2) — SunOS 5.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

_lwp_create(2)

_lwp_setprivate(2)

ucontext(5)

_lwp_makecontext(2)

NAME

_lwp_makecontext − initialize an LWP context

SYNOPSIS

#include <types.h>
#include <sys/lwp.h>
#include <ucontext.h>

void _lwp_makecontext(ucontext_t ∗ucp, void (∗start_routine)( void ∗), void ∗arg,

void ∗private, caddr_t stack_base, size_t stack_size);

DESCRIPTION

_lwp_makecontext() initializes the user context structure pointed to by ucp. The user context is defined by ucontext(5).  The resulting user context can be used by _lwp_create(2) for specifying the initial state of the new LWP.  The user context is set up to start executing the function start_routine with a single argument, arg, and to call _lwp_exit(2) if start_routine returns.  The new LWP will use the storage starting at stack_base and continuing for stack_size bytes as an execution stack.  The initial value in LWP-private memory will be set to private (see _lwp_setprivate(2)).  The signal mask in the user context is not initialized. 

SEE ALSO

_lwp_create(2), _lwp_setprivate(2), ucontext(5). 

SunOS 5.2  —  Last change: 30 Jul 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026