int
_lwp_ctl(int features, struct lwpctl **address)
)
prepares per-LWP communication area for the calling LWP,
and maps it into the calling process' address space.
It takes the following arguments.
featuresLWPCTL_FEATURE_CURCPULWPCTL_FEATURE_PCTRaddress
The per-LWP communication area is described by an lwpctl structure.
It has following members, depending on
features.
LWPCTL_CPU_NONE
when the LWP is not running on any CPU.
It's updated by the kernel and should be considered as read-only for
userland.
It's available only if requested with the
LWPCTL_FEATURE_CURCPU
flag.
LWPCTL_FEATURE_PCTR
flag.
)
returns 0 on success.
Otherwise, -1 is returned and
errno
is set to indicate the error.