487 lines
151 KiB
Plaintext
487 lines
151 KiB
Plaintext
Copyright (c) 1986 Xerox Corporation. All rights reserved.
|
||
|
||
2
|
||
|
||
31.8 The SYSQUEUE mechanism
|
||
1
|
||
|
||
The SYSQUEUE facility provides a low-level queueing facility. The functions described herein are all system internal: they can cause much confusion if misused.
|
||
A SYSQUEUE is a datum containing a pointer to the first element of the queue and a pointer to the last; each item in the queue points to the next via a pointer field located at offset 0 in the item (its QLINK field in the QABLEITEM record). A SYSQUEUE can be created by calling (NCREATE 'SYSQUEUE).
|
||
(\ENQUEUE Q ITEM) [Function]
|
||
1
|
||
|
||
Enqueues ITEM on Q, i.e., links it to the tail of the queue, updating Q's tail pointer appropriately.
|
||
1
|
||
|
||
(\DEQUEUE Q) [Function]
|
||
1
|
||
|
||
Removes the first item from Q and returns it, or returns NIL if Q is empty.
|
||
1
|
||
|
||
(\UNQUEUE Q ITEM NOERRORFLG) [Function]
|
||
1
|
||
|
||
Removes the ITEM from Q, wherever it is located in the queue, and returns it. If ITEM is not in Q, causes an error, unless NOERRORFLG is true, in which case it returns NIL.
|
||
1
|
||
|
||
(\QUEUELENGTH Q) [Function]
|
||
1
|
||
|
||
Returns the number of elements in Q.
|
||
1
|
||
|
||
(\ONQUEUE ITEM Q) [Function]
|
||
1
|
||
|
||
True if ITEM is an element of Q.
|
||
1
|
||
|
||
|