Manpages

NAME

_lwp_makecontext − initialize an LWP context

SYNOPSIS

#include <sys/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

The _lwp_makecontext() function initializes the user context structure pointed to by ucp. The user context is defined by ucontext(3HEAD). 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_exit(2), _lwp_setprivate(2), ucontext(3HEAD)