Lines Matching refs:elem

70 #define APR_RING_ENTRY(elem)						\
72 struct elem * volatile next; \
73 struct elem * volatile prev; \
91 #define APR_RING_HEAD(head, elem) \
93 struct elem * volatile next; \
94 struct elem * volatile prev; \
113 * / | elem | \/ | elem | \/ | elem | \
135 * / | elem | \/ \/ | elem | \
156 * @param elem The name of the element struct
159 #define APR_RING_SENTINEL(hp, elem, link) \
160 (struct elem *)((char *)(&(hp)->next) - APR_OFFSETOF(struct elem, link))
189 * @param elem The name of the element struct
192 #define APR_RING_INIT(hp, elem, link) do { \
193 APR_RING_FIRST((hp)) = APR_RING_SENTINEL((hp), elem, link); \
194 APR_RING_LAST((hp)) = APR_RING_SENTINEL((hp), elem, link); \
200 * @param elem The name of the element struct
204 #define APR_RING_EMPTY(hp, elem, link) \
205 (APR_RING_FIRST((hp)) == APR_RING_SENTINEL((hp), elem, link))
283 * @param elem The name of the element struct
286 #define APR_RING_SPLICE_HEAD(hp, ep1, epN, elem, link) \
287 APR_RING_SPLICE_AFTER(APR_RING_SENTINEL((hp), elem, link), \
296 * @param elem The name of the element struct
299 #define APR_RING_SPLICE_TAIL(hp, ep1, epN, elem, link) \
300 APR_RING_SPLICE_BEFORE(APR_RING_SENTINEL((hp), elem, link), \
308 * @param elem The name of the element struct
311 #define APR_RING_INSERT_HEAD(hp, nep, elem, link) \
312 APR_RING_SPLICE_HEAD((hp), (nep), (nep), elem, link)
319 * @param elem The name of the element struct
322 #define APR_RING_INSERT_TAIL(hp, nep, elem, link) \
323 APR_RING_SPLICE_TAIL((hp), (nep), (nep), elem, link)
329 * @param elem The name of the element struct
332 #define APR_RING_CONCAT(h1, h2, elem, link) do { \
333 if (!APR_RING_EMPTY((h2), elem, link)) { \
334 APR_RING_SPLICE_BEFORE(APR_RING_SENTINEL((h1), elem, link), \
337 APR_RING_INIT((h2), elem, link); \
345 * @param elem The name of the element struct
348 #define APR_RING_PREPEND(h1, h2, elem, link) do { \
349 if (!APR_RING_EMPTY((h2), elem, link)) { \
350 APR_RING_SPLICE_AFTER(APR_RING_SENTINEL((h1), elem, link), \
353 APR_RING_INIT((h2), elem, link); \
384 * @param elem The name of the element struct
387 #define APR_RING_FOREACH(ep, head, elem, link) \
389 ep != APR_RING_SENTINEL(head, elem, link); \
397 * @param elem The name of the element struct
400 #define APR_RING_FOREACH_SAFE(ep1, ep2, head, elem, link) \
402 ep1 != APR_RING_SENTINEL(head, elem, link); \
414 #define APR_RING_CHECK(hp, elem, link, msg) \
415 APR_RING_CHECK_ELEM(APR_RING_SENTINEL(hp, elem, link), elem, link, msg)
417 #define APR_RING_CHECK_ELEM(ep, elem, link, msg) do { \
418 struct elem *start = (ep); \
419 struct elem *here = start; \
432 fprintf(stderr, "\t*** elem->next->prev != elem\n"); \
436 fprintf(stderr, "\t*** elem->prev->next != elem\n"); \
444 #define APR_RING_CHECK_CONSISTENCY(hp, elem, link) \
445 APR_RING_CHECK_ELEM_CONSISTENCY(APR_RING_SENTINEL(hp, elem, link),\
446 elem, link)
448 #define APR_RING_CHECK_ELEM_CONSISTENCY(ep, elem, link) do { \
449 struct elem *start = (ep); \
450 struct elem *here = start; \
472 * @param elem The name of the element struct
476 #define APR_RING_CHECK(hp, elem, link, msg)
483 * @param elem The name of the element struct
486 #define APR_RING_CHECK_CONSISTENCY(hp, elem, link)
493 * @param elem The name of the element struct
497 #define APR_RING_CHECK_ELEM(ep, elem, link, msg)
505 * @param elem The name of the element struct
508 #define APR_RING_CHECK_ELEM_CONSISTENCY(ep, elem, link)