Important: The information in this document is obsolete and should not be used for new development.
Summary of the Queue Utilities
Pascal Summary
Constants
CONST {queue types} vType = 1; {vertical retrace queue type} ioQType = 2; {file I/O or driver I/O queue type} drvQType = 3; {drive queue type} evType = 4; {event queue type} fsQType = 5; {volume-control-block queue type} sIQType = 6; {slot interrupt queue type} dtQType = 7; {deferred task queue type} nmType = 8; {notification queue type} slpQType = 16; {sleep queue type}Data Types
TYPE QHdr = {queue header record} RECORD qFlags: Integer; {information on queue} qHead: QElemPtr; {pointer to the first queue element} qTail: QElemPtr; {pointer to the last queue element} END; QHdrPtr = ^QHdr; QTypes = ( {queue types} dummyType, {reserved} vType, {vertical retrace queue type} ioQType, {file I/O or driver I/O queue type} drvQType, {drive queue type} evType, {event queue type} fsQType, {volume-control-block queue type} sIQType, {slot interrupt queue type} dtQType, {deferred task queue type} {nmType,} {notification queue type} {slpQType} {sleep queue type} ); QElem = {queue element record} RECORD CASE QTypes OF dtQType: (dtQElem: DeferredTask); {deferred task } { queue element} vType: (vblQElem: VBLTask); {vertical retrace } { queue element} ioQType: (ioQElem: ParamBlockRec); {file I/O queue element} drvQType: (drvQElem: DrvQEl); {drive queue element} evType: (evQElem: EvQEl); {event queue element} fsQType: (vcbQElem: VCB); {volume-control-block } { queue element} {sIQType: (siQElem: SlotIntQElement;} {slot interupt } { queue element} {nmType: (nmQElem: NMRec);} {notification } { queue element} {slpQType: (slpQElem: SleepQRec);} {sleep queue element} END; QElemPtr = ^QElem;Routines
PROCEDURE Enqueue (qElement: QElemPtr; qHeader: QHdrPtr); FUNCTION Dequeue (qElement: QElemPtr; qHeader: QHdrPtr): OSErr;C Summary
Constants
enum { /*queue types*/ vType = 1, /*vertical retrace queue type*/ ioQType = 2, /*file I/O or driver I/O queue type*/ drvQType = 3, /*drive queue type*/ evType = 4, /*event queue type*/ fsQType = 5, /*volume-control-block queue type*/ sIQType = 6, /*slot interrupt queue type*/ dtQType = 7, /*deferred task queue type*/ }; enum { /*value for the notification queue type*/ nmType = 8 /*notification queue type*/ }; enum { /*value for the sleep queue type*/ slpQType = 16 /*sleep queue type*/ };Data Types
struct QHdr { /*queue header record*/ short qFlags; /*information on queue*/ QElemPtr qHead; /*pointer to the first queue element*/ QElemPtr qTail; /*pointer to the last queue element*/ }; typedef struct QHdr QHdr; typedef QHdr *QHdrPtr; typedef unsigned short QTypes; /*queue types*/ struct QElem { /*queue element record*/ struct QElem *qLink; /*pointer to the next queue element*/ short qType; /*type of queue element*/ short qData[1]; /*variable array of data; type of data and */ /* length depend on the queue type, */ /* specified in the qType field*/ }; typedef struct QElem QElem; typedef QElem *QElemPtr;Routines
pascal void Enqueue (QElemPtr qElement, QHdrPtr qHeader); pascal OSErr Dequeue (QElemPtr qElement, QHdrPtr qHeader);Assembly-Language Summary
QHdr Data Structure
0 qFlags word information on queue 2 qHead long pointer to first queue entry 6 qTail long pointer to last queue entry QElem Data Structure
0 qLink long pointer to the next queue element 4 qType word type of queue element 6 qData word variable array of data; type of data and length depend on the queue type, specified in the qType
fieldResult Codes
noErr 0 No error qErr -1 Entry is not in specified queue