man.bsd.lv manual page server

Manual Page Search Parameters

_LWP_GETPRIVATE(2) System Calls Manual _LWP_GETPRIVATE(2)

_lwp_getprivate, _lwp_setprivateget and set light-weight process private data

library “libc”

#include <lwp.h>

void *
_lwp_getprivate(void);

void
_lwp_setprivate(void *ptr);

() stores the pointer to private data ptr in a location private to the LWP.

() returns the pointer to private data for the LWP.

Some platforms provide alternative ways quicker than () to use the pointer.

alpha
The pointer can be retrieved by call_pal PAL_rdunique.
amd64
The base address of %fs register is set to the pointer so that the private data can be accessed using the selector.
i386
The base address of %gs register is set to the pointer so that the private data can be accessed using the selector.
sparc
register is set to the pointer.

The _lwp_getprivate() and _lwp_setprivate() functions are always successful, and no return value is reserved to indicate an error.

_lwp_makecontext(3)

The _lwp_getprivate() and _lwp_setprivate() system calls first appeared in NetBSD 2.0.

September 7, 2013 NetBSD-9.2