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

waitq Kernel Service

Purpose

Waits for a queue element to be placed on a device queue.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/deviceq.h>
struct req_qe *waitq (queue_id)
cba_id queue_id;

Parameter

queue_id Specifies the device queue identifier.

Description

The waitq kernel service is not part of the base kernel but is provided by the device queue management kernel extension. This queue management kernel extension must be loaded into the kernel before loading any kernel extensions referencing these services.

The waitq kernel service waits for a queue element to be placed on the device queue specified by the queue_id parameter. This service performs these two actions:

Processes can only use the waitq kernel service to wait for a single device queue. Use the et_wait service to wait on the occurrence of more than one event, such as multiple device queues.

The waitq kernel service uses the EVENT_SHORT form of the et_wait kernel service. Therefore, a signal does not terminate the wait. Use the et _wait kernel service if you want a signal to terminate the wait.

The readq kernel service can be used to read the active queue element from a queue. It does not wait for a queue element if there are none in the queue.

Attention: The server must not alter any fields in the queue element or the system may halt.

Execution Environment

The waitq kernel service can be called from the process environment only.

Return Values

The waitq service returns the address of the active queue element in the device queue.

Implementation Specifics

The waitq kernel service is part of the Device Queue Management kernel extension.

Related Information

The et_wait kernel service.


[ Previous | Next | Contents | Home | Search ]