• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/include/sys/

Lines Matching refs:parent

55  *	- each red node (except for the root) has a black parent,
314 struct type *rbe_parent; /* parent element */ \
325 #define RB_SET(elm, parent, field) do { \
326 RB_PARENT(elm, field) = parent; \
436 struct type *parent, *gparent, *tmp; \
437 while ((parent = RB_PARENT(elm, field)) != NULL && \
438 RB_COLOR(parent, field) == RB_RED) { \
439 gparent = RB_PARENT(parent, field); \
440 if (parent == RB_LEFT(gparent, field)) { \
444 RB_SET_BLACKRED(parent, gparent, field);\
448 if (RB_RIGHT(parent, field) == elm) { \
449 RB_ROTATE_LEFT(head, parent, tmp, field);\
450 tmp = parent; \
451 parent = elm; \
454 RB_SET_BLACKRED(parent, gparent, field); \
460 RB_SET_BLACKRED(parent, gparent, field);\
464 if (RB_LEFT(parent, field) == elm) { \
465 RB_ROTATE_RIGHT(head, parent, tmp, field);\
466 tmp = parent; \
467 parent = elm; \
470 RB_SET_BLACKRED(parent, gparent, field); \
479 name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \
484 if (RB_LEFT(parent, field) == elm) { \
485 tmp = RB_RIGHT(parent, field); \
487 RB_SET_BLACKRED(tmp, parent, field); \
488 RB_ROTATE_LEFT(head, parent, tmp, field);\
489 tmp = RB_RIGHT(parent, field); \
496 elm = parent; \
497 parent = RB_PARENT(elm, field); \
507 tmp = RB_RIGHT(parent, field); \
509 RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
510 RB_COLOR(parent, field) = RB_BLACK; \
513 RB_ROTATE_LEFT(head, parent, tmp, field);\
518 tmp = RB_LEFT(parent, field); \
520 RB_SET_BLACKRED(tmp, parent, field); \
521 RB_ROTATE_RIGHT(head, parent, tmp, field);\
522 tmp = RB_LEFT(parent, field); \
529 elm = parent; \
530 parent = RB_PARENT(elm, field); \
540 tmp = RB_LEFT(parent, field); \
542 RB_COLOR(tmp, field) = RB_COLOR(parent, field);\
543 RB_COLOR(parent, field) = RB_BLACK; \
546 RB_ROTATE_RIGHT(head, parent, tmp, field);\
560 struct type *child, *parent, *old = elm; \
572 parent = RB_PARENT(elm, field); \
575 RB_PARENT(child, field) = parent; \
576 if (parent) { \
577 if (RB_LEFT(parent, field) == elm) \
578 RB_LEFT(parent, field) = child; \
580 RB_RIGHT(parent, field) = child; \
581 RB_AUGMENT(parent); \
585 parent = elm; \
598 if (parent) { \
599 left = parent; \
606 parent = RB_PARENT(elm, field); \
609 RB_PARENT(child, field) = parent; \
610 if (parent) { \
611 if (RB_LEFT(parent, field) == elm) \
612 RB_LEFT(parent, field) = child; \
614 RB_RIGHT(parent, field) = child; \
615 RB_AUGMENT(parent); \
620 name##_RB_REMOVE_COLOR(head, parent, child); \
630 struct type *parent = NULL; \
634 parent = tmp; \
635 comp = (cmp)(elm, parent); \
643 RB_SET(elm, parent, field); \
644 if (parent != NULL) { \
646 RB_LEFT(parent, field) = elm; \
648 RB_RIGHT(parent, field) = elm; \
649 RB_AUGMENT(parent); \
748 struct type *parent = NULL; \
750 parent = tmp; \
756 return (parent); \