Lines Matching refs:name
62 #define SPLAY_HEAD(name, type) \ argument
63 struct name { \
117 #define SPLAY_PROTOTYPE(name, type, field, cmp) \ argument
118 void name##_SPLAY(struct name *head, struct type *elm); \
119 void name##_SPLAY_MINMAX(struct name *head, int __comp); \
120 struct type *name##_SPLAY_INSERT(struct name *head, struct type *elm); \
121 struct type *name##_SPLAY_REMOVE(struct name *head, struct type *elm); \
125 name##_SPLAY_FIND(struct name *head, struct type *elm) \
129 name##_SPLAY(head, elm); \
136 name##_SPLAY_NEXT(struct name *head, struct type *elm) \
138 name##_SPLAY(head, elm); \
150 name##_SPLAY_MIN_MAX(struct name *head, int val) \
152 name##_SPLAY_MINMAX(head, val); \
159 #define SPLAY_GENERATE(name, type, field, cmp) \ argument
161 name##_SPLAY_INSERT(struct name *head, struct type *elm) \
167 name##_SPLAY(head, elm); \
187 name##_SPLAY_REMOVE(struct name *head, struct type *elm) \
192 name##_SPLAY(head, elm); \
200 name##_SPLAY(head, elm); \
209 name##_SPLAY(struct name *head, struct type *elm) \
248 void name##_SPLAY_MINMAX(struct name *head, int __comp) \
286 #define SPLAY_INSERT(name, x, y) name##_SPLAY_INSERT(x, y) argument
287 #define SPLAY_REMOVE(name, x, y) name##_SPLAY_REMOVE(x, y) argument
288 #define SPLAY_FIND(name, x, y) name##_SPLAY_FIND(x, y) argument
289 #define SPLAY_NEXT(name, x, y) name##_SPLAY_NEXT(x, y) argument
290 #define SPLAY_MIN(name, x) (SPLAY_EMPTY(x) ? NULL \ argument
291 : name##_SPLAY_MIN_MAX(x, SPLAY_NEGINF))
292 #define SPLAY_MAX(name, x) (SPLAY_EMPTY(x) ? NULL \ argument
293 : name##_SPLAY_MIN_MAX(x, SPLAY_INF))
295 #define SPLAY_FOREACH(x, name, head) \ argument
296 for ((x) = SPLAY_MIN(name, head); \
298 (x) = SPLAY_NEXT(name, head, x))
301 #define RB_HEAD(name, type) \ argument
302 struct name { \
385 #define RB_PROTOTYPE(name, type, field, cmp) \ argument
386 RB_PROTOTYPE_INTERNAL(name, type, field, cmp,)
387 #define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ argument
388 RB_PROTOTYPE_INTERNAL(name, type, field, cmp, static)
389 #define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ argument
390 RB_PROTOTYPE_INSERT_COLOR(name, type, attr); \
391 RB_PROTOTYPE_REMOVE_COLOR(name, type, attr); \
392 RB_PROTOTYPE_INSERT(name, type, attr); \
393 RB_PROTOTYPE_REMOVE(name, type, attr); \
394 RB_PROTOTYPE_FIND(name, type, attr); \
395 RB_PROTOTYPE_NFIND(name, type, attr); \
396 RB_PROTOTYPE_NEXT(name, type, attr); \
397 RB_PROTOTYPE_PREV(name, type, attr); \
398 RB_PROTOTYPE_MINMAX(name, type, attr);
399 #define RB_PROTOTYPE_INSERT_COLOR(name, type, attr) \ argument
400 attr void name##_RB_INSERT_COLOR(struct name *, struct type *)
401 #define RB_PROTOTYPE_REMOVE_COLOR(name, type, attr) \ argument
402 attr void name##_RB_REMOVE_COLOR(struct name *, struct type *,\
404 #define RB_PROTOTYPE_REMOVE(name, type, attr) \ argument
405 attr struct type *name##_RB_REMOVE(struct name *, struct type *)
406 #define RB_PROTOTYPE_INSERT(name, type, attr) \ argument
407 attr struct type *name##_RB_INSERT(struct name *, struct type *)
408 #define RB_PROTOTYPE_FIND(name, type, attr) \ argument
409 attr struct type *name##_RB_FIND(struct name *, struct type *)
410 #define RB_PROTOTYPE_NFIND(name, type, attr) \ argument
411 attr struct type *name##_RB_NFIND(struct name *, struct type *)
412 #define RB_PROTOTYPE_NEXT(name, type, attr) \ argument
413 attr struct type *name##_RB_NEXT(struct type *)
414 #define RB_PROTOTYPE_PREV(name, type, attr) \ argument
415 attr struct type *name##_RB_PREV(struct type *)
416 #define RB_PROTOTYPE_MINMAX(name, type, attr) \ argument
417 attr struct type *name##_RB_MINMAX(struct name *, int)
422 #define RB_GENERATE(name, type, field, cmp) \ argument
423 RB_GENERATE_INTERNAL(name, type, field, cmp,)
424 #define RB_GENERATE_STATIC(name, type, field, cmp) \ argument
425 RB_GENERATE_INTERNAL(name, type, field, cmp, __attribute__((unused)) static)
426 #define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ argument
427 RB_GENERATE_INSERT_COLOR(name, type, field, attr) \
428 RB_GENERATE_REMOVE_COLOR(name, type, field, attr) \
429 RB_GENERATE_INSERT(name, type, field, cmp, attr) \
430 RB_GENERATE_REMOVE(name, type, field, attr) \
431 RB_GENERATE_FIND(name, type, field, cmp, attr) \
432 RB_GENERATE_NFIND(name, type, field, cmp, attr) \
433 RB_GENERATE_NEXT(name, type, field, attr) \
434 RB_GENERATE_PREV(name, type, field, attr) \
435 RB_GENERATE_MINMAX(name, type, field, attr)
437 #define RB_GENERATE_INSERT_COLOR(name, type, field, attr) \ argument
439 name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \
482 #define RB_GENERATE_REMOVE_COLOR(name, type, field, attr) \ argument
484 name##_RB_REMOVE_COLOR(struct name *head, \
572 #define RB_GENERATE_REMOVE(name, type, field, attr) \ argument
574 name##_RB_REMOVE(struct name *head, struct type *elm) \
636 name##_RB_REMOVE_COLOR(head, parent, child); \
640 #define RB_GENERATE_INSERT(name, type, field, cmp, attr) \ argument
643 name##_RB_INSERT(struct name *head, struct type *elm) \
668 name##_RB_INSERT_COLOR(head, elm); \
672 #define RB_GENERATE_FIND(name, type, field, cmp, attr) \ argument
675 name##_RB_FIND(struct name *head, struct type *elm) \
691 #define RB_GENERATE_NFIND(name, type, field, cmp, attr) \ argument
694 name##_RB_NFIND(struct name *head, struct type *elm) \
713 #define RB_GENERATE_NEXT(name, type, field, attr) \ argument
716 name##_RB_NEXT(struct type *elm) \
736 #define RB_GENERATE_PREV(name, type, field, attr) \ argument
739 name##_RB_PREV(struct type *elm) \
759 #define RB_GENERATE_MINMAX(name, type, field, attr) \ argument
761 name##_RB_MINMAX(struct name *head, int val) \
778 #define RB_INSERT(name, x, y) name##_RB_INSERT(x, y) argument
779 #define RB_REMOVE(name, x, y) name##_RB_REMOVE(x, y) argument
780 #define RB_FIND(name, x, y) name##_RB_FIND(x, y) argument
781 #define RB_NFIND(name, x, y) name##_RB_NFIND(x, y) argument
782 #define RB_NEXT(name, x, y) name##_RB_NEXT(y) argument
783 #define RB_PREV(name, x, y) name##_RB_PREV(y) argument
784 #define RB_MIN(name, x) name##_RB_MINMAX(x, RB_NEGINF) argument
785 #define RB_MAX(name, x) name##_RB_MINMAX(x, RB_INF) argument
787 #define RB_FOREACH(x, name, head) \ argument
788 for ((x) = RB_MIN(name, head); \
790 (x) = name##_RB_NEXT(x))
792 #define RB_FOREACH_FROM(x, name, y) \ argument
794 ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
797 #define RB_FOREACH_SAFE(x, name, head, y) \ argument
798 for ((x) = RB_MIN(name, head); \
799 ((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
802 #define RB_FOREACH_REVERSE(x, name, head) \ argument
803 for ((x) = RB_MAX(name, head); \
805 (x) = name##_RB_PREV(x))
807 #define RB_FOREACH_REVERSE_FROM(x, name, y) \ argument
809 ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
812 #define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \ argument
813 for ((x) = RB_MAX(name, head); \
814 ((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \