Mac Developer Library

Developer

IODataQueueShared.h Reference

Options
Deployment Target:

On This Page

IODataQueueShared.h Reference

Included Headers

  • <libkern/OSTypes.h>

  • <mach/port.h>

  • <mach/message.h>

Data Types

See the Overview section above for header-level documentation.

  • A struct mapping to the appendix region of a data queue.

    Declaration

    Objective-C

    typedef struct _IODataQueueAppendix { UInt32 version; mach_msg_header_t msgh; } IODataQueueAppendix;

    Discussion

    This struct is variable sized dependent on the version. The struct represents the data queue appendix information.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • Represents an entry within the data queue

    Declaration

    Objective-C

    typedef struct _IODataQueueEntry{ UInt32 size; UInt8 data[4]; } IODataQueueEntry;

    Discussion

    This is a variable sized struct. The data field simply represents the start of the data region. The size of the data region is stored in the size field. The whole size of the specific entry is the size of a UInt32 plus the size of the data region.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

  • A struct mapping to the header region of a data queue.

    Declaration

    Objective-C

    typedef struct _IODataQueueMemory { UInt32 queueSize; volatile UInt32 head; volatile UInt32 tail; IODataQueueEntry queue[1]; } IODataQueueMemory;

    Discussion

    This struct is variable sized. The struct represents the data queue header information plus a pointer to the actual data queue itself. The size of the struct is the combined size of the header fields (3 * sizeof(UInt32)) plus the actual size of the queue region. This size is stored in the queueSize field.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

Constants

See the Overview section above for header-level documentation.

  • Declaration

    Objective-C

    #define DATA_QUEUE_ENTRY_HEADER_SIZE (sizeof(IODataQueueEntry) - 4) #define DATA_QUEUE_MEMORY_APPENDIX_SIZE (sizeof(IODataQueueAppendix)) #define DATA_QUEUE_MEMORY_HEADER_SIZE (sizeof(IODataQueueMemory) - sizeof(IODataQueueEntry))

    Constants

    • DATA_QUEUE_ENTRY_HEADER_SIZE

      DATA_QUEUE_ENTRY_HEADER_SIZE

      Represents the size of the data queue entry header independent of the actual size of the data in the entry. This is the overhead of each entry in the queue. The total size of an entry is equal to this value plus the size stored in the entry's size field (in IODataQueueEntry).

      Available in OS X v10.0 and later.

    • DATA_QUEUE_MEMORY_APPENDIX_SIZE

      DATA_QUEUE_MEMORY_APPENDIX_SIZE

      Represents the size of the data queue memory appendix independent of the actual size of the queue data itself. The total size of the queue memory is equal to this value plus the size of queue header and size of the queue data region which is stored in the queueSize field of IODataQueueMeory.

      Available in OS X v10.5 and later.

    • DATA_QUEUE_MEMORY_HEADER_SIZE

      DATA_QUEUE_MEMORY_HEADER_SIZE

      Represents the size of the data queue memory header independent of the actual size of the queue data itself. The total size of the queue memory is equal to this value plus the size of the queue appendix and the size of the queue data region which is stored in the queueSize field of IODataQueueMeory.

      Available in OS X v10.0 and later.

    Import Statement