Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

_lwp_unpark_all(2) [netbsd man page]

_LWP_UNPARK_ALL(2)					      BSD System Calls Manual						_LWP_UNPARK_ALL(2)

NAME
_lwp_unpark_all -- resume execution of a waiting LWP LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <lwp.h> ssize_t _lwp_unpark_all(lwpid_t *targets, size_t ntargets, const void *hint); DESCRIPTION
_lwp_unpark_all() resumes execution of one or more light-weight processes listed in the array pointed to by targets. The target LWPs are assumed to be waiting in the kernel as a result of calls to _lwp_park(). If any of the target LWPs are not currently waiting, those LWPs will return immediately upon the next call to _lwp_park(). The value pointed to by ntargets specifies the size of the array pointed to by targets. If the targets argument is given as NULL, the maxi- mum size of the array (expressed as the number of entries) is returned. See _lwp_park(2) for a description of the hint argument. RETURN VALUES
If the maximum size of the targets array is not being queried, a return of 0 indicates that the call succeeded. A -1 return value indicates an error occurred and errno is set to indicate the reason. ERRORS
[EFAULT] The value specified for targets is invalid. [EINVAL] The value specified for ntargets is out of range. [ENOMEM] Insufficient resources are available to complete the operation. SEE ALSO
_lwp_park(2), _lwp_unpark(2), _lwp_wakeup(2) HISTORY
The _lwp_unpark_all() system call first appeared in NetBSD 5.0. BSD
February 10, 2007 BSD

Check Out this Related Man Page

_LWP_PARK(2)						      BSD System Calls Manual						      _LWP_PARK(2)

NAME
_lwp_park -- wait interruptably in the kernel LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <lwp.h> int _lwp_park(const struct timespec *abstime, lwpid_t unpark, const void *hint, const void *unparkhint); DESCRIPTION
_lwp_park() can be used to synchronize access to resources among multiple light-weight processes. It causes the calling LWP to wait inter- ruptably in the kernel, until one of the following conditions is met: o The abstime argument is non-NULL, and the absolute UTC time it specifies has passed. o The LWP receives a directed signal posted using _lwp_kill(), or is elected to handle a signal on behalf of its containing process. o The LWP is awoken by another LWP in the same process that has made a call to _lwp_wakeup(). o The LWP is awoken by another LWP in the same process that has made a call to _lwp_unpark() or _lwp_unpark_all(). The preferred method to awaken an LWP sleeping as a result of a call to _lwp_park() is to make a call to _lwp_unpark(), or _lwp_unpark_all(). The _lwp_wakeup() system call is a more general facility, and requires more resources to execute. The optional hint argument specifies the address of object upon which the LWP is synchronizing. When the hint value is matched between calls to _lwp_park() and _lwp_unpark() or _lwp_unpark_all(), it may reduce the time necessary for the system to resume execution of waiting LWPs. The unpark and unparkhint arguments can be used to fold a park operation and unpark operation into a single system call. If unpark is non- zero, the system will behave as if the following call had been made before the calling thread begins to wait: _lwp_unpark(unpark, unparkhint); RETURN VALUES
_lwp_park() may return a value of 0. Otherwise, -1 is returned and errno is set to provide more information. ERRORS
[EALREADY] A request was made to wake the LWP before it began to wait in the kernel. [EINTR] The LWP has been awoken by a signal or by a call to one of the following functions: _lwp_unpark(), _lwp_unpark_all(), _lwp_wakeup(). [EINVAL] The time value specified by abstime is invalid. [ESRCH] No LWP can be found in the current process corresponding to unpark. [ETIMEDOUT] The UTC time specified by abstime has passed. SEE ALSO
_lwp_unpark(2), _lwp_unpark_all(2), _lwp_wakeup(2) HISTORY
The _lwp_park() system call first appeared in NetBSD 5.0. BSD
September 25, 2007 BSD
Man Page