    field             131 libdb/queue.h  #define SLIST_FOREACH(var, head, field)					\
    field             132 libdb/queue.h  	for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
    field             138 libdb/queue.h  #define SLIST_INSERT_AFTER(slistelm, elm, field) do {			\
    field             139 libdb/queue.h  	(elm)->field.sle_next = (slistelm)->field.sle_next;		\
    field             140 libdb/queue.h  	(slistelm)->field.sle_next = (elm);				\
    field             143 libdb/queue.h  #define SLIST_INSERT_HEAD(head, elm, field) do {			\
    field             144 libdb/queue.h  	(elm)->field.sle_next = (head)->slh_first;			\
    field             148 libdb/queue.h  #define SLIST_NEXT(elm, field)	((elm)->field.sle_next)
    field             150 libdb/queue.h  #define SLIST_REMOVE_HEAD(head, field) do {				\
    field             151 libdb/queue.h  	(head)->slh_first = (head)->slh_first->field.sle_next;		\
    field             154 libdb/queue.h  #define SLIST_REMOVE(head, elm, type, field) do {			\
    field             156 libdb/queue.h  		SLIST_REMOVE_HEAD((head), field);			\
    field             160 libdb/queue.h  		while( curelm->field.sle_next != (elm) )		\
    field             161 libdb/queue.h  			curelm = curelm->field.sle_next;		\
    field             162 libdb/queue.h  		curelm->field.sle_next =				\
    field             163 libdb/queue.h  		    curelm->field.sle_next->field.sle_next;		\
    field             196 libdb/queue.h  #define	STAILQ_LAST(head, type, field)					\
    field             200 libdb/queue.h  		((char *)((head)->stqh_last) - __offsetof(struct type, field))))
    field             202 libdb/queue.h  #define STAILQ_FOREACH(var, head, field)				\
    field             203 libdb/queue.h  	for((var) = (head)->stqh_first; (var); (var) = (var)->field.stqe_next)
    field             205 libdb/queue.h  #define STAILQ_INSERT_HEAD(head, elm, field) do {			\
    field             206 libdb/queue.h  	if (((elm)->field.stqe_next = (head)->stqh_first) == NULL)	\
    field             207 libdb/queue.h  		(head)->stqh_last = &(elm)->field.stqe_next;		\
    field             211 libdb/queue.h  #define STAILQ_INSERT_TAIL(head, elm, field) do {			\
    field             212 libdb/queue.h  	(elm)->field.stqe_next = NULL;					\
    field             214 libdb/queue.h  	(head)->stqh_last = &(elm)->field.stqe_next;			\
    field             217 libdb/queue.h  #define STAILQ_INSERT_AFTER(head, tqelm, elm, field) do {		\
    field             218 libdb/queue.h  	if (((elm)->field.stqe_next = (tqelm)->field.stqe_next) == NULL)\
    field             219 libdb/queue.h  		(head)->stqh_last = &(elm)->field.stqe_next;		\
    field             220 libdb/queue.h  	(tqelm)->field.stqe_next = (elm);				\
    field             223 libdb/queue.h  #define STAILQ_NEXT(elm, field)	((elm)->field.stqe_next)
    field             225 libdb/queue.h  #define STAILQ_REMOVE_HEAD(head, field) do {				\
    field             227 libdb/queue.h  	     (head)->stqh_first->field.stqe_next) == NULL)		\
    field             231 libdb/queue.h  #define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do {			\
    field             232 libdb/queue.h  	if (((head)->stqh_first = (elm)->field.stqe_next) == NULL)	\
    field             236 libdb/queue.h  #define STAILQ_REMOVE(head, elm, type, field) do {			\
    field             238 libdb/queue.h  		STAILQ_REMOVE_HEAD(head, field);			\
    field             242 libdb/queue.h  		while( curelm->field.stqe_next != (elm) )		\
    field             243 libdb/queue.h  			curelm = curelm->field.stqe_next;		\
    field             244 libdb/queue.h  		if((curelm->field.stqe_next =				\
    field             245 libdb/queue.h  		    curelm->field.stqe_next->field.stqe_next) == NULL)	\
    field             246 libdb/queue.h  			(head)->stqh_last = &(curelm)->field.stqe_next;	\
    field             275 libdb/queue.h  #define LIST_FOREACH(var, head, field)					\
    field             276 libdb/queue.h  	for((var) = (head)->lh_first; (var); (var) = (var)->field.le_next)
    field             282 libdb/queue.h  #define LIST_INSERT_AFTER(listelm, elm, field) do {			\
    field             283 libdb/queue.h  	if (((elm)->field.le_next = (listelm)->field.le_next) != NULL)	\
    field             284 libdb/queue.h  		(listelm)->field.le_next->field.le_prev =		\
    field             285 libdb/queue.h  		    &(elm)->field.le_next;				\
    field             286 libdb/queue.h  	(listelm)->field.le_next = (elm);				\
    field             287 libdb/queue.h  	(elm)->field.le_prev = &(listelm)->field.le_next;		\
    field             290 libdb/queue.h  #define LIST_INSERT_BEFORE(listelm, elm, field) do {			\
    field             291 libdb/queue.h  	(elm)->field.le_prev = (listelm)->field.le_prev;		\
    field             292 libdb/queue.h  	(elm)->field.le_next = (listelm);				\
    field             293 libdb/queue.h  	*(listelm)->field.le_prev = (elm);				\
    field             294 libdb/queue.h  	(listelm)->field.le_prev = &(elm)->field.le_next;		\
    field             297 libdb/queue.h  #define LIST_INSERT_HEAD(head, elm, field) do {				\
    field             298 libdb/queue.h  	if (((elm)->field.le_next = (head)->lh_first) != NULL)		\
    field             299 libdb/queue.h  		(head)->lh_first->field.le_prev = &(elm)->field.le_next;\
    field             301 libdb/queue.h  	(elm)->field.le_prev = &(head)->lh_first;			\
    field             304 libdb/queue.h  #define LIST_NEXT(elm, field)	((elm)->field.le_next)
    field             306 libdb/queue.h  #define LIST_REMOVE(elm, field) do {					\
    field             307 libdb/queue.h  	if ((elm)->field.le_next != NULL)				\
    field             308 libdb/queue.h  		(elm)->field.le_next->field.le_prev = 			\
    field             309 libdb/queue.h  		    (elm)->field.le_prev;				\
    field             310 libdb/queue.h  	*(elm)->field.le_prev = (elm)->field.le_next;			\
    field             336 libdb/queue.h  #define TAILQ_FOREACH(var, head, field)					\
    field             337 libdb/queue.h  	for (var = TAILQ_FIRST(head); var; var = TAILQ_NEXT(var, field))
    field             339 libdb/queue.h  #define TAILQ_FOREACH_REVERSE(var, head, headname, field)		\
    field             342 libdb/queue.h  	     (var) = TAILQ_PREV((var), headname, field))
    field             349 libdb/queue.h  #define	TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
    field             351 libdb/queue.h  #define TAILQ_PREV(elm, headname, field) \
    field             352 libdb/queue.h  	(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
    field             359 libdb/queue.h  #define TAILQ_INSERT_HEAD(head, elm, field) do {			\
    field             360 libdb/queue.h  	if (((elm)->field.tqe_next = (head)->tqh_first) != NULL)	\
    field             361 libdb/queue.h  		(head)->tqh_first->field.tqe_prev =			\
    field             362 libdb/queue.h  		    &(elm)->field.tqe_next;				\
    field             364 libdb/queue.h  		(head)->tqh_last = &(elm)->field.tqe_next;		\
    field             366 libdb/queue.h  	(elm)->field.tqe_prev = &(head)->tqh_first;			\
    field             369 libdb/queue.h  #define TAILQ_INSERT_TAIL(head, elm, field) do {			\
    field             370 libdb/queue.h  	(elm)->field.tqe_next = NULL;					\
    field             371 libdb/queue.h  	(elm)->field.tqe_prev = (head)->tqh_last;			\
    field             373 libdb/queue.h  	(head)->tqh_last = &(elm)->field.tqe_next;			\
    field             376 libdb/queue.h  #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do {		\
    field             377 libdb/queue.h  	if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
    field             378 libdb/queue.h  		(elm)->field.tqe_next->field.tqe_prev = 		\
    field             379 libdb/queue.h  		    &(elm)->field.tqe_next;				\
    field             381 libdb/queue.h  		(head)->tqh_last = &(elm)->field.tqe_next;		\
    field             382 libdb/queue.h  	(listelm)->field.tqe_next = (elm);				\
    field             383 libdb/queue.h  	(elm)->field.tqe_prev = &(listelm)->field.tqe_next;		\
    field             386 libdb/queue.h  #define TAILQ_INSERT_BEFORE(listelm, elm, field) do {			\
    field             387 libdb/queue.h  	(elm)->field.tqe_prev = (listelm)->field.tqe_prev;		\
    field             388 libdb/queue.h  	(elm)->field.tqe_next = (listelm);				\
    field             389 libdb/queue.h  	*(listelm)->field.tqe_prev = (elm);				\
    field             390 libdb/queue.h  	(listelm)->field.tqe_prev = &(elm)->field.tqe_next;		\
    field             393 libdb/queue.h  #define TAILQ_REMOVE(head, elm, field) do {				\
    field             394 libdb/queue.h  	if (((elm)->field.tqe_next) != NULL)				\
    field             395 libdb/queue.h  		(elm)->field.tqe_next->field.tqe_prev = 		\
    field             396 libdb/queue.h  		    (elm)->field.tqe_prev;				\
    field             398 libdb/queue.h  		(head)->tqh_last = (elm)->field.tqe_prev;		\
    field             399 libdb/queue.h  	*(elm)->field.tqe_prev = (elm)->field.tqe_next;			\
    field             424 libdb/queue.h  #define CIRCLEQ_FOREACH(var, head, field)				\
    field             427 libdb/queue.h  	    (var) = (var)->field.cqe_next)
    field             429 libdb/queue.h  #define CIRCLEQ_FOREACH_REVERSE(var, head, field)			\
    field             432 libdb/queue.h  	    (var) = (var)->field.cqe_prev)
    field             439 libdb/queue.h  #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do {		\
    field             440 libdb/queue.h  	(elm)->field.cqe_next = (listelm)->field.cqe_next;		\
    field             441 libdb/queue.h  	(elm)->field.cqe_prev = (listelm);				\
    field             442 libdb/queue.h  	if ((listelm)->field.cqe_next == (void *)(head))		\
    field             445 libdb/queue.h  		(listelm)->field.cqe_next->field.cqe_prev = (elm);	\
    field             446 libdb/queue.h  	(listelm)->field.cqe_next = (elm);				\
    field             449 libdb/queue.h  #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do {		\
    field             450 libdb/queue.h  	(elm)->field.cqe_next = (listelm);				\
    field             451 libdb/queue.h  	(elm)->field.cqe_prev = (listelm)->field.cqe_prev;		\
    field             452 libdb/queue.h  	if ((listelm)->field.cqe_prev == (void *)(head))		\
    field             455 libdb/queue.h  		(listelm)->field.cqe_prev->field.cqe_next = (elm);	\
    field             456 libdb/queue.h  	(listelm)->field.cqe_prev = (elm);				\
    field             459 libdb/queue.h  #define CIRCLEQ_INSERT_HEAD(head, elm, field) do {			\
    field             460 libdb/queue.h  	(elm)->field.cqe_next = (head)->cqh_first;			\
    field             461 libdb/queue.h  	(elm)->field.cqe_prev = (void *)(head);				\
    field             465 libdb/queue.h  		(head)->cqh_first->field.cqe_prev = (elm);		\
    field             469 libdb/queue.h  #define CIRCLEQ_INSERT_TAIL(head, elm, field) do {			\
    field             470 libdb/queue.h  	(elm)->field.cqe_next = (void *)(head);				\
    field             471 libdb/queue.h  	(elm)->field.cqe_prev = (head)->cqh_last;			\
    field             475 libdb/queue.h  		(head)->cqh_last->field.cqe_next = (elm);		\
    field             481 libdb/queue.h  #define CIRCLEQ_NEXT(elm,field) ((elm)->field.cqe_next)
    field             483 libdb/queue.h  #define CIRCLEQ_PREV(elm,field) ((elm)->field.cqe_prev)
    field             485 libdb/queue.h  #define	CIRCLEQ_REMOVE(head, elm, field) do {				\
    field             486 libdb/queue.h  	if ((elm)->field.cqe_next == (void *)(head))			\
    field             487 libdb/queue.h  		(head)->cqh_last = (elm)->field.cqe_prev;		\
    field             489 libdb/queue.h  		(elm)->field.cqe_next->field.cqe_prev =			\
    field             490 libdb/queue.h  		    (elm)->field.cqe_prev;				\
    field             491 libdb/queue.h  	if ((elm)->field.cqe_prev == (void *)(head))			\
    field             492 libdb/queue.h  		(head)->cqh_first = (elm)->field.cqe_next;		\
    field             494 libdb/queue.h  		(elm)->field.cqe_prev->field.cqe_next =			\
    field             495 libdb/queue.h  		    (elm)->field.cqe_next;				\