#include <stddef.h>
Go to the source code of this file.
|
#define | QUEUE(type) QUEUE |
|
#define | QUEUE_NEXT(q) (*(QUEUE **) &((*(q))[0])) |
|
#define | QUEUE_PREV(q) (*(QUEUE **) &((*(q))[1])) |
|
#define | QUEUE_PREV_NEXT(q) (QUEUE_NEXT(QUEUE_PREV(q))) |
|
#define | QUEUE_NEXT_PREV(q) (QUEUE_PREV(QUEUE_NEXT(q))) |
|
#define | QUEUE_DATA(ptr, type, field) ((type *) ((char *) (ptr) - offsetof(type, field))) |
|
#define | QUEUE_FOREACH(q, h) for ((q) = QUEUE_NEXT(h); (q) != (h); (q) = QUEUE_NEXT(q)) |
|
#define | QUEUE_EMPTY(q) ((const QUEUE *) (q) == (const QUEUE *) QUEUE_NEXT(q)) |
|
#define | QUEUE_HEAD(q) (QUEUE_NEXT(q)) |
|
#define | QUEUE_INIT(q) |
|
#define | QUEUE_ADD(h, n) |
|
#define | QUEUE_SPLIT(h, q, n) |
|
#define | QUEUE_MOVE(h, n) |
|
#define | QUEUE_INSERT_HEAD(h, q) |
|
#define | QUEUE_INSERT_TAIL(h, q) |
|
#define | QUEUE_REMOVE(q) |
|
◆ QUEUE
#define QUEUE |
( |
|
type | ) |
QUEUE |
◆ QUEUE_NEXT
#define QUEUE_NEXT |
( |
|
q | ) |
(*(QUEUE **) &((*(q))[0])) |
◆ QUEUE_PREV
#define QUEUE_PREV |
( |
|
q | ) |
(*(QUEUE **) &((*(q))[1])) |
◆ QUEUE_PREV_NEXT
◆ QUEUE_NEXT_PREV
◆ QUEUE_DATA
#define QUEUE_DATA |
( |
|
ptr, |
|
|
|
type, |
|
|
|
field |
|
) |
| ((type *) ((char *) (ptr) - offsetof(type, field))) |
◆ QUEUE_FOREACH
◆ QUEUE_EMPTY
◆ QUEUE_HEAD
◆ QUEUE_INIT
Value: do { \
QUEUE_NEXT(q) = (q); \
QUEUE_PREV(q) = (q); \
} \
while (0)
◆ QUEUE_ADD
#define QUEUE_ADD |
( |
|
h, |
|
|
|
n |
|
) |
| |
Value: do { \
QUEUE_PREV_NEXT(h) = (h); \
} \
while (0)
#define QUEUE_PREV(q)
Definition: queue.h:28
#define QUEUE_NEXT(q)
Definition: queue.h:27
◆ QUEUE_SPLIT
#define QUEUE_SPLIT |
( |
|
h, |
|
|
|
q, |
|
|
|
n |
|
) |
| |
Value: do { \
QUEUE_PREV_NEXT(n) = (n); \
QUEUE_NEXT(n) = (q); \
QUEUE_PREV_NEXT(h) = (h); \
QUEUE_PREV(q) = (n); \
} \
while (0)
◆ QUEUE_MOVE
#define QUEUE_MOVE |
( |
|
h, |
|
|
|
n |
|
) |
| |
Value: do { \
QUEUE_INIT(n); \
else { \
QUEUE_SPLIT(h, q, n); \
} \
} \
while (0)
#define QUEUE_EMPTY(q)
Definition: queue.h:42
#define QUEUE_HEAD(q)
Definition: queue.h:45
◆ QUEUE_INSERT_HEAD
#define QUEUE_INSERT_HEAD |
( |
|
h, |
|
|
|
q |
|
) |
| |
Value: do { \
QUEUE_PREV(q) = (h); \
QUEUE_NEXT_PREV(q) = (q); \
QUEUE_NEXT(h) = (q); \
} \
while (0)
◆ QUEUE_INSERT_TAIL
#define QUEUE_INSERT_TAIL |
( |
|
h, |
|
|
|
q |
|
) |
| |
Value: do { \
QUEUE_NEXT(q) = (h); \
QUEUE_PREV_NEXT(q) = (q); \
QUEUE_PREV(h) = (q); \
} \
while (0)
◆ QUEUE_REMOVE
#define QUEUE_REMOVE |
( |
|
q | ) |
|
buckets that are currently pending (have pending requests)
next requests queue
requests for recycling
pending requests waiting to be assigned to a bucket
finished requests that are done performing and waiting for their callbacks to be called from the main thread