_LWP_CTL(2) | System Calls Manual | _LWP_CTL(2) |
_lwp_ctl
—
#include <sys/lwpctl.h>
#include <lwp.h>
int
_lwp_ctl
(int
features, struct lwpctl
**address);
_lwp_ctl
() prepares per-LWP communication area for the
calling LWP, and maps it into the calling process' address space. It takes the
following arguments.
LWPCTL_FEATURE_CURCPU
LWPCTL_FEATURE_PCTR
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._lwp_ctl
() returns 0 on success. Otherwise, -1 is
returned and errno is set to indicate the error.
April 13, 2012 | NetBSD 9.0 |