Lines Matching refs:tmp

88 #define SPLAY_ROTATE_RIGHT(head, tmp, field) do {			\  argument
89 SPLAY_LEFT((head)->sph_root, field) = SPLAY_RIGHT(tmp, field); \
90 SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
91 (head)->sph_root = tmp; \
94 #define SPLAY_ROTATE_LEFT(head, tmp, field) do { \ argument
95 SPLAY_RIGHT((head)->sph_root, field) = SPLAY_LEFT(tmp, field); \
96 SPLAY_LEFT(tmp, field) = (head)->sph_root; \
97 (head)->sph_root = tmp; \
100 #define SPLAY_LINKLEFT(head, tmp, field) do { \ argument
101 SPLAY_LEFT(tmp, field) = (head)->sph_root; \
102 tmp = (head)->sph_root; \
106 #define SPLAY_LINKRIGHT(head, tmp, field) do { \ argument
107 SPLAY_RIGHT(tmp, field) = (head)->sph_root; \
108 tmp = (head)->sph_root; \
360 #define RB_ROTATE_LEFT(head, elm, tmp, field) do { \ argument
361 (tmp) = RB_RIGHT(elm, field); \
362 if ((RB_RIGHT(elm, field) = RB_LEFT(tmp, field)) != NULL) { \
365 RB_SET_PARENT(tmp, RB_PARENT(elm, field), field); \
366 RB_SWAP_CHILD(head, elm, tmp, field); \
367 RB_LEFT(tmp, field) = (elm); \
368 RB_SET_PARENT(elm, tmp, field); \
372 #define RB_ROTATE_RIGHT(head, elm, tmp, field) do { \ argument
373 (tmp) = RB_LEFT(elm, field); \
374 if ((RB_LEFT(elm, field) = RB_RIGHT(tmp, field)) != NULL) { \
377 RB_SET_PARENT(tmp, RB_PARENT(elm, field), field); \
378 RB_SWAP_CHILD(head, elm, tmp, field); \
379 RB_RIGHT(tmp, field) = (elm); \
380 RB_SET_PARENT(elm, tmp, field); \
391 #define RB_PARENT_ROTATE_LEFT(parent, left, tmp, field) do { \ argument
392 (tmp) = RB_RIGHT(left, field); \
393 if ((RB_RIGHT(left, field) = RB_LEFT(tmp, field)) != NULL) { \
396 RB_SET_PARENT(tmp, parent, field); \
397 RB_LEFT(parent, field) = (tmp); \
398 RB_LEFT(tmp, field) = (left); \
399 RB_SET_PARENT(left, tmp, field); \
403 #define RB_PARENT_ROTATE_RIGHT(parent, right, tmp, field) do { \ argument
404 (tmp) = RB_LEFT(right, field); \
405 if ((RB_LEFT(right, field) = RB_RIGHT(tmp, field)) != NULL) { \
408 RB_SET_PARENT(tmp, parent, field); \
409 RB_RIGHT(parent, field) = (tmp); \
410 RB_RIGHT(tmp, field) = (right); \
411 RB_SET_PARENT(right, tmp, field); \
432 #define RB_RED_ROTATE_LEFT(head, elm, tmp, field) do { \ argument
433 (tmp) = RB_RIGHT(elm, field); \
434 RB_RIGHT(elm, field) = RB_LEFT(tmp, field); \
436 RB_SET_PARENT(tmp, RB_PARENT(elm, field), field); \
437 RB_SWAP_CHILD(head, elm, tmp, field); \
438 RB_LEFT(tmp, field) = (elm); \
439 RB_SET_PARENT(elm, tmp, field); \
443 #define RB_RED_ROTATE_RIGHT(head, elm, tmp, field) do { \ argument
444 (tmp) = RB_LEFT(elm, field); \
445 RB_LEFT(elm, field) = RB_RIGHT(tmp, field); \
447 RB_SET_PARENT(tmp, RB_PARENT(elm, field), field); \
448 RB_SWAP_CHILD(head, elm, tmp, field); \
449 RB_RIGHT(tmp, field) = (elm); \
450 RB_SET_PARENT(elm, tmp, field); \
515 struct type *parent, *gparent, *tmp; \
519 tmp = RB_RIGHT(gparent, field); \
520 if (RB_ISRED(tmp, field)) { \
521 RB_COLOR(tmp, field) = RB_BLACK; \
528 tmp, field); \
529 tmp = parent; \
531 elm = tmp; \
534 RB_ROTATE_RIGHT(head, gparent, tmp, field); \
536 tmp = RB_LEFT(gparent, field); \
537 if (RB_ISRED(tmp, field)) { \
538 RB_COLOR(tmp, field) = RB_BLACK; \
545 tmp, field); \
546 tmp = parent; \
548 elm = tmp; \
551 RB_ROTATE_LEFT(head, gparent, tmp, field); \
561 struct type *elm, *tmp; \
565 tmp = RB_RIGHT(parent, field); \
566 if (RB_COLOR(tmp, field) == RB_RED) { \
567 RB_SET_BLACKRED(tmp, parent, field); \
568 RB_RED_ROTATE_LEFT(head, parent, tmp, field); \
569 tmp = RB_RIGHT(parent, field); \
571 if (RB_ISRED(RB_RIGHT(tmp, field), field)) \
572 RB_COLOR(RB_RIGHT(tmp, field), field) = RB_BLACK; \
573 else if (RB_ISRED(RB_LEFT(tmp, field), field)) { \
575 RB_PARENT_ROTATE_RIGHT(parent, tmp, \
578 tmp = oleft; \
580 RB_COLOR(tmp, field) = RB_RED; \
585 RB_COLOR(tmp, field) = RB_COLOR(parent, field); \
587 RB_ROTATE_LEFT(head, parent, tmp, field); \
591 tmp = RB_LEFT(parent, field); \
592 if (RB_COLOR(tmp, field) == RB_RED) { \
593 RB_SET_BLACKRED(tmp, parent, field); \
594 RB_RED_ROTATE_RIGHT(head, parent, tmp, field); \
595 tmp = RB_LEFT(parent, field); \
597 if (RB_ISRED(RB_LEFT(tmp, field), field)) \
598 RB_COLOR(RB_LEFT(tmp, field), field) = RB_BLACK; \
599 else if (RB_ISRED(RB_RIGHT(tmp, field), field)) { \
601 RB_PARENT_ROTATE_LEFT(parent, tmp, \
604 tmp = oright; \
606 RB_COLOR(tmp, field) = RB_RED; \
611 RB_COLOR(tmp, field) = RB_COLOR(parent, field); \
613 RB_ROTATE_RIGHT(head, parent, tmp, field); \
672 struct type *tmp; \
675 tmp = RB_ROOT(head); \
676 while (tmp) { \
677 parent = tmp; \
680 tmp = RB_LEFT(tmp, field); \
682 tmp = RB_RIGHT(tmp, field); \
684 return (tmp); \
707 struct type *tmp = RB_ROOT(head); \
709 while (tmp) { \
710 comp = cmp(elm, tmp); \
712 tmp = RB_LEFT(tmp, field); \
714 tmp = RB_RIGHT(tmp, field); \
716 return (tmp); \
726 struct type *tmp = RB_ROOT(head); \
729 while (tmp) { \
730 comp = cmp(elm, tmp); \
732 res = tmp; \
733 tmp = RB_LEFT(tmp, field); \
736 tmp = RB_RIGHT(tmp, field); \
738 return (tmp); \
793 struct type *tmp = RB_ROOT(head); \
795 while (tmp) { \
796 parent = tmp; \
798 tmp = RB_LEFT(tmp, field); \
800 tmp = RB_RIGHT(tmp, field); \