| _LWP_CTL(2) | System Calls Manual | _LWP_CTL(2) |
_lwp_ctl — prepare
per-LWP communication area between kernel and userland
Standard C Library (libc, -lc)
#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_CURCPULWPCTL_FEATURE_PCTRThe 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.The _lwp_ctl() function returns the
value 0 if successful; otherwise the value -1 is returned and
the global variable errno is set to indicate the
error.
| April 13, 2012 | NetBSD 11.0 |