Interface: tos.interfaces.ResourceQueue
interface ResourceQueue
A queue interface for managing client ids when performing resource
arbitration. A single slot in the queue is guaranteed to each resource
client, with the actual queing policy determined by the implementation
of the interface.
- Author:
-
Kevin Klues <klueska@cs.wustl.edu>
- Date:
-
$Date: 2006/12/12 18:23:15 $
Commands
command resource_client_id_t dequeue()
command error_t enqueue(resource_client_id_t id)
command bool isEmpty()
command bool isEnqueued(resource_client_id_t id)
Commands - Details
dequeue
command resource_client_id_t dequeue()
- Returns:
-
The cleint id at the head of the queue.
enqueue
command error_t enqueue(resource_client_id_t id)
- Parameters:
-
cleintId - - the cleint id to enqueue
- Returns:
-
SUCCESS if the client id was enqueued successfully
EBUSY if it has already been enqueued.
isEmpty
command bool isEmpty()
- Returns:
-
TRUE if the queue is empty.
FALSE if there is at least one entry in the queue
isEnqueued
command bool isEnqueued(resource_client_id_t id)
- Returns:
-
TRUE if the client id is in the queue.
FALSE if it does not