elm               142 libdb/queue.h  #define SLIST_INSERT_AFTER(slistelm, elm, field) do {			\
elm               143 libdb/queue.h  	(elm)->field.sle_next = (slistelm)->field.sle_next;		\
elm               144 libdb/queue.h  	(slistelm)->field.sle_next = (elm);				\
elm               147 libdb/queue.h  #define SLIST_INSERT_HEAD(head, elm, field) do {			\
elm               148 libdb/queue.h  	(elm)->field.sle_next = (head)->slh_first;			\
elm               149 libdb/queue.h  	(head)->slh_first = (elm);					\
elm               152 libdb/queue.h  #define SLIST_NEXT(elm, field)	((elm)->field.sle_next)
elm               158 libdb/queue.h  #define SLIST_REMOVE(head, elm, type, field) do {			\
elm               159 libdb/queue.h  	if ((head)->slh_first == (elm)) {				\
elm               164 libdb/queue.h  		while( curelm->field.sle_next != (elm) )		\
elm               213 libdb/queue.h  #define STAILQ_INSERT_HEAD(head, elm, field) do {			\
elm               214 libdb/queue.h  	if (((elm)->field.stqe_next = (head)->stqh_first) == NULL)	\
elm               215 libdb/queue.h  		(head)->stqh_last = &(elm)->field.stqe_next;		\
elm               216 libdb/queue.h  	(head)->stqh_first = (elm);					\
elm               219 libdb/queue.h  #define STAILQ_INSERT_TAIL(head, elm, field) do {			\
elm               220 libdb/queue.h  	(elm)->field.stqe_next = NULL;					\
elm               221 libdb/queue.h  	*(head)->stqh_last = (elm);					\
elm               222 libdb/queue.h  	(head)->stqh_last = &(elm)->field.stqe_next;			\
elm               225 libdb/queue.h  #define STAILQ_INSERT_AFTER(head, tqelm, elm, field) do {		\
elm               226 libdb/queue.h  	if (((elm)->field.stqe_next = (tqelm)->field.stqe_next) == NULL)\
elm               227 libdb/queue.h  		(head)->stqh_last = &(elm)->field.stqe_next;		\
elm               228 libdb/queue.h  	(tqelm)->field.stqe_next = (elm);				\
elm               231 libdb/queue.h  #define STAILQ_NEXT(elm, field)	((elm)->field.stqe_next)
elm               239 libdb/queue.h  #define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field) do {			\
elm               240 libdb/queue.h  	if (((head)->stqh_first = (elm)->field.stqe_next) == NULL)	\
elm               244 libdb/queue.h  #define STAILQ_REMOVE(head, elm, type, field) do {			\
elm               245 libdb/queue.h  	if ((head)->stqh_first == (elm)) {				\
elm               250 libdb/queue.h  		while( curelm->field.stqe_next != (elm) )		\
elm               293 libdb/queue.h  #define LIST_INSERT_AFTER(listelm, elm, field) do {			\
elm               294 libdb/queue.h  	if (((elm)->field.le_next = (listelm)->field.le_next) != NULL)	\
elm               296 libdb/queue.h  		    &(elm)->field.le_next;				\
elm               297 libdb/queue.h  	(listelm)->field.le_next = (elm);				\
elm               298 libdb/queue.h  	(elm)->field.le_prev = &(listelm)->field.le_next;		\
elm               301 libdb/queue.h  #define LIST_INSERT_BEFORE(listelm, elm, field) do {			\
elm               302 libdb/queue.h  	(elm)->field.le_prev = (listelm)->field.le_prev;		\
elm               303 libdb/queue.h  	(elm)->field.le_next = (listelm);				\
elm               304 libdb/queue.h  	*(listelm)->field.le_prev = (elm);				\
elm               305 libdb/queue.h  	(listelm)->field.le_prev = &(elm)->field.le_next;		\
elm               308 libdb/queue.h  #define LIST_INSERT_HEAD(head, elm, field) do {				\
elm               309 libdb/queue.h  	if (((elm)->field.le_next = (head)->lh_first) != NULL)		\
elm               310 libdb/queue.h  		(head)->lh_first->field.le_prev = &(elm)->field.le_next;\
elm               311 libdb/queue.h  	(head)->lh_first = (elm);					\
elm               312 libdb/queue.h  	(elm)->field.le_prev = &(head)->lh_first;			\
elm               315 libdb/queue.h  #define LIST_NEXT(elm, field)	((elm)->field.le_next)
elm               317 libdb/queue.h  #define LIST_REMOVE(elm, field) do {					\
elm               318 libdb/queue.h  	if ((elm)->field.le_next != NULL)				\
elm               319 libdb/queue.h  		(elm)->field.le_next->field.le_prev = 			\
elm               320 libdb/queue.h  		    (elm)->field.le_prev;				\
elm               321 libdb/queue.h  	*(elm)->field.le_prev = (elm)->field.le_next;			\
elm               364 libdb/queue.h  #define	TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
elm               366 libdb/queue.h  #define TAILQ_PREV(elm, headname, field) \
elm               367 libdb/queue.h  	(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
elm               374 libdb/queue.h  #define TAILQ_INSERT_HEAD(head, elm, field) do {			\
elm               375 libdb/queue.h  	if (((elm)->field.tqe_next = (head)->tqh_first) != NULL)	\
elm               377 libdb/queue.h  		    &(elm)->field.tqe_next;				\
elm               379 libdb/queue.h  		(head)->tqh_last = &(elm)->field.tqe_next;		\
elm               380 libdb/queue.h  	(head)->tqh_first = (elm);					\
elm               381 libdb/queue.h  	(elm)->field.tqe_prev = &(head)->tqh_first;			\
elm               384 libdb/queue.h  #define TAILQ_INSERT_TAIL(head, elm, field) do {			\
elm               385 libdb/queue.h  	(elm)->field.tqe_next = NULL;					\
elm               386 libdb/queue.h  	(elm)->field.tqe_prev = (head)->tqh_last;			\
elm               387 libdb/queue.h  	*(head)->tqh_last = (elm);					\
elm               388 libdb/queue.h  	(head)->tqh_last = &(elm)->field.tqe_next;			\
elm               391 libdb/queue.h  #define TAILQ_INSERT_AFTER(head, listelm, elm, field) do {		\
elm               392 libdb/queue.h  	if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
elm               393 libdb/queue.h  		(elm)->field.tqe_next->field.tqe_prev = 		\
elm               394 libdb/queue.h  		    &(elm)->field.tqe_next;				\
elm               396 libdb/queue.h  		(head)->tqh_last = &(elm)->field.tqe_next;		\
elm               397 libdb/queue.h  	(listelm)->field.tqe_next = (elm);				\
elm               398 libdb/queue.h  	(elm)->field.tqe_prev = &(listelm)->field.tqe_next;		\
elm               401 libdb/queue.h  #define TAILQ_INSERT_BEFORE(listelm, elm, field) do {			\
elm               402 libdb/queue.h  	(elm)->field.tqe_prev = (listelm)->field.tqe_prev;		\
elm               403 libdb/queue.h  	(elm)->field.tqe_next = (listelm);				\
elm               404 libdb/queue.h  	*(listelm)->field.tqe_prev = (elm);				\
elm               405 libdb/queue.h  	(listelm)->field.tqe_prev = &(elm)->field.tqe_next;		\
elm               408 libdb/queue.h  #define TAILQ_REMOVE(head, elm, field) do {				\
elm               409 libdb/queue.h  	if (((elm)->field.tqe_next) != NULL)				\
elm               410 libdb/queue.h  		(elm)->field.tqe_next->field.tqe_prev = 		\
elm               411 libdb/queue.h  		    (elm)->field.tqe_prev;				\
elm               413 libdb/queue.h  		(head)->tqh_last = (elm)->field.tqe_prev;		\
elm               414 libdb/queue.h  	*(elm)->field.tqe_prev = (elm)->field.tqe_next;			\
elm               458 libdb/queue.h  #define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do {		\
elm               459 libdb/queue.h  	(elm)->field.cqe_next = (listelm)->field.cqe_next;		\
elm               460 libdb/queue.h  	(elm)->field.cqe_prev = (listelm);				\
elm               462 libdb/queue.h  		(head)->cqh_last = (elm);				\
elm               464 libdb/queue.h  		(listelm)->field.cqe_next->field.cqe_prev = (elm);	\
elm               465 libdb/queue.h  	(listelm)->field.cqe_next = (elm);				\
elm               468 libdb/queue.h  #define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do {		\
elm               469 libdb/queue.h  	(elm)->field.cqe_next = (listelm);				\
elm               470 libdb/queue.h  	(elm)->field.cqe_prev = (listelm)->field.cqe_prev;		\
elm               472 libdb/queue.h  		(head)->cqh_first = (elm);				\
elm               474 libdb/queue.h  		(listelm)->field.cqe_prev->field.cqe_next = (elm);	\
elm               475 libdb/queue.h  	(listelm)->field.cqe_prev = (elm);				\
elm               478 libdb/queue.h  #define CIRCLEQ_INSERT_HEAD(head, elm, field) do {			\
elm               479 libdb/queue.h  	(elm)->field.cqe_next = (head)->cqh_first;			\
elm               480 libdb/queue.h  	(elm)->field.cqe_prev = (void *)(head);				\
elm               482 libdb/queue.h  		(head)->cqh_last = (elm);				\
elm               484 libdb/queue.h  		(head)->cqh_first->field.cqe_prev = (elm);		\
elm               485 libdb/queue.h  	(head)->cqh_first = (elm);					\
elm               488 libdb/queue.h  #define CIRCLEQ_INSERT_TAIL(head, elm, field) do {			\
elm               489 libdb/queue.h  	(elm)->field.cqe_next = (void *)(head);				\
elm               490 libdb/queue.h  	(elm)->field.cqe_prev = (head)->cqh_last;			\
elm               492 libdb/queue.h  		(head)->cqh_first = (elm);				\
elm               494 libdb/queue.h  		(head)->cqh_last->field.cqe_next = (elm);		\
elm               495 libdb/queue.h  	(head)->cqh_last = (elm);					\
elm               500 libdb/queue.h  #define CIRCLEQ_NEXT(elm,field) ((elm)->field.cqe_next)
elm               502 libdb/queue.h  #define CIRCLEQ_PREV(elm,field) ((elm)->field.cqe_prev)
elm               504 libdb/queue.h  #define	CIRCLEQ_REMOVE(head, elm, field) do {				\
elm               505 libdb/queue.h  	if ((elm)->field.cqe_next == (void *)(head))			\
elm               506 libdb/queue.h  		(head)->cqh_last = (elm)->field.cqe_prev;		\
elm               508 libdb/queue.h  		(elm)->field.cqe_next->field.cqe_prev =			\
elm               509 libdb/queue.h  		    (elm)->field.cqe_prev;				\
elm               510 libdb/queue.h  	if ((elm)->field.cqe_prev == (void *)(head))			\
elm               511 libdb/queue.h  		(head)->cqh_first = (elm)->field.cqe_next;		\
elm               513 libdb/queue.h  		(elm)->field.cqe_prev->field.cqe_next =			\
elm               514 libdb/queue.h  		    (elm)->field.cqe_next;				\