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

Item Description
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.