version 1.1.1.1, 2012/02/21 23:16:02
|
version 1.1.1.2, 2013/07/22 00:32:35
|
Line 36
|
Line 36
|
#define _SYS_QUEUE_H_ |
#define _SYS_QUEUE_H_ |
|
|
/* |
/* |
* This file defines five types of data structures: singly-linked lists, | * This file defines five types of data structures: singly-linked lists, |
* lists, simple queues, tail queues, and circular queues. |
* lists, simple queues, tail queues, and circular queues. |
* |
* |
* |
* |
Line 95
|
Line 95
|
struct name { \ |
struct name { \ |
struct type *slh_first; /* first element */ \ |
struct type *slh_first; /* first element */ \ |
} |
} |
| |
#define SLIST_HEAD_INITIALIZER(head) \ |
#define SLIST_HEAD_INITIALIZER(head) \ |
{ NULL } |
{ NULL } |
|
|
Line 107 struct name { \
|
Line 107 struct name { \
|
struct { \ |
struct { \ |
struct type *sle_next; /* next element */ \ |
struct type *sle_next; /* next element */ \ |
} |
} |
| |
/* |
/* |
* Singly-linked List access methods. |
* Singly-linked List access methods. |
*/ |
*/ |
Line 322 struct { \
|
Line 322 struct { \
|
struct type **tqe_prev; /* address of previous next element */ \ |
struct type **tqe_prev; /* address of previous next element */ \ |
} |
} |
|
|
/* | /* |
* tail queue access methods | * tail queue access methods |
*/ |
*/ |
#define TAILQ_FIRST(head) ((head)->tqh_first) |
#define TAILQ_FIRST(head) ((head)->tqh_first) |
#define TAILQ_END(head) NULL |
#define TAILQ_END(head) NULL |
Line 430 struct { \
|
Line 430 struct { \
|
} |
} |
|
|
/* |
/* |
* Circular queue access methods | * Circular queue access methods |
*/ |
*/ |
#define CIRCLEQ_FIRST(head) ((head)->cqh_first) |
#define CIRCLEQ_FIRST(head) ((head)->cqh_first) |
#define CIRCLEQ_LAST(head) ((head)->cqh_last) |
#define CIRCLEQ_LAST(head) ((head)->cqh_last) |