Makes the currently active kernel thread nonrunnable when called from a user-mode exception handler.
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/except.h>
void uexblock ( tid)
tid_t *tid;
Item | Description |
---|---|
tid | Specifies the thread ID of the currently active kernel thread to be put into a wait state. |
The uexblock kernel service puts the currently active kernel thread specified by the tid parameter into a wait state until the uexclear kernel service is used to make the thread runnable again. If the uexblock kernel service is called from the process environment, the tid parameter must specify the current active thread; otherwise the system will crash with a kernel panic.
The uexblock kernel service can be used to lazily control user-mode threads access to a shared serially usable resource. Multiple threads can use a serially used resource, but only one process at a time. When a thread attempts to but cannot access the resource, a user-mode exception can be set up to occur. This gives control to an exception handler registered by the uexadd kernel service. This exception handler can then block the thread using the uexblock kernel service until the resource is made available. At this time, the uexclear kernel service can be used to make the blocked thread runnable.
The uexblock kernel service can be called from either the process or interrupt environment.
The uexblock service has no return values.