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

e_clear_wait Kernel Service

Purpose

Clears the wait condition for a kernel thread.

Syntax

#include <sys/sleep.h>
void e_clear_wait (tid, result)
tid_t tid;
int result;

Parameters

tid Specifies the kernel thread to be awakened.
result Specifies the value returned to the awakened kernel thread. The following values can be used:
THREAD_AWAKENED Usually generated by the e_wakeup or e_wakeup_one kernel service to indicate a normal wakeup.
THREAD_INTERRUPTED Indicates an interrupted sleep. This value is usually generated by a signal delivery when the INTERRUPTIBLE flag is set.
THREAD_TIMED_OUT Indicates a timeout expiration.
THREAD_OTHER Delineates the predefined system codes from those that need to be defined at the subsystem level. Subsystem should define their own values greater than or equal to this value.

Description

The e_clear_wait kernel service clears the wait condition for the kernel thread specified by the tid parameter, and the thread is made runnable.

This kernel service differs from the e_wakeup, e_wakeup_one, and e_wakeup_w_result kernel services in the fact that it assumes the identity of the thread to be awakened. This kernel service should be used to handle exceptional cases, where a special action needs to be taken. The result parameter is used to specify the value returned to the awakened thread by the e_block_thread or e_sleep_thread kernel service.

The e_clear_wait kernel service has no return values.

Execution Environment

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

Implementation Specifics

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

Related Information

The e_wakeup, e_wakeup_one, or e_wakeup_w_result kernel services, e_block_thread kernel servic, e_sleep_thread kernel service.

Process and Exception Management Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.


[ Previous | Next | Contents | Home | Search ]