Eric Wu / Mbed 2 deprecated WifiRobot

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

xqueue_t Struct Reference

xqueue_t Struct Reference

xqueue_t structure: queue with arbitrary length. More...

#include <xqueue.h>

Data Fields

uint8_t * data
 Assigned on initialization to existing buffer.
size_t head
 Buffer write index.
size_t tail
 Buffer read index.
size_t rCount
 Read count.
size_t wCount
 Write count.
size_t capacity
 Maximum size of the data buffer (must be a power of 2, <= 0x8000)
size_t capacityMask
 Mask used instead of costly modulo operator.

Detailed Description

xqueue_t structure: queue with arbitrary length.

Separation of write/read count allows for use in concurrent environments

Definition at line 27 of file xqueue.h.


Field Documentation

size_t capacity

Maximum size of the data buffer (must be a power of 2, <= 0x8000)

Definition at line 33 of file xqueue.h.

size_t capacityMask

Mask used instead of costly modulo operator.

Definition at line 34 of file xqueue.h.

uint8_t* data

Assigned on initialization to existing buffer.

Definition at line 28 of file xqueue.h.

size_t head

Buffer write index.

Definition at line 29 of file xqueue.h.

size_t rCount

Read count.

Definition at line 31 of file xqueue.h.

size_t tail

Buffer read index.

Definition at line 30 of file xqueue.h.

size_t wCount

Write count.

Definition at line 32 of file xqueue.h.