[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 1

uexblock Kernel Service

Purpose

Makes the currently active kernel thread nonrunnable when called from a user-mode exception handler.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/except.h>
void uexblock (tid)
tid_t *tid;

Parameter

tid Specifies the thread ID of the currently active kernel thread to be put into a wait state.

Description

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.

Execution Environment

The uexblock kernel service can be called from either the process or interrupt environment.

Return Values

The uexblock service has no return values.

Implementation Specifics

The uexblock kernel service is part of Base Operating System (BOS) Runtime.

Related Information

The uexclear kernel service.

User-Mode Exception Handling and Kernel Extension and Device Driver Management Services in AIX Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]