_LWP_PARK(2) | NetBSD System Calls Manual | _LWP_PARK(2) |
int
_lwp_park(const struct timespec *abstime, lwpid_t unpark, const void *hint, const void *unparkhint);
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);
September 25, 2007 | NetBSD 5.99 |