Lines Matching refs:root
154 * the root of the middle tree. Otherwise, the root
261 * into a splay tree with the found node at the root.
310 ipc_tree_entry_t root;
314 root = splay->ist_root;
315 if (root != ITE_NULL) {
316 *namep = root->ite_name;
317 *entryp = root;
322 return root != ITE_NULL;
337 ipc_tree_entry_t root;
341 root = splay->ist_root;
342 if (root != ITE_NULL) {
344 ipc_splay_prim_assemble(root,
347 ipc_splay_prim_lookup(name, root, &root,
351 splay->ist_root = root;
354 if (name != root->ite_name)
355 root = ITE_NULL;
360 return root;
377 ipc_tree_entry_t root;
383 root = splay->ist_root;
384 if (root == ITE_NULL) {
389 ipc_splay_prim_assemble(root,
392 ipc_splay_prim_lookup(name, root, &root,
397 assert(root->ite_name != name);
399 if (name < root->ite_name) {
400 assert(root->ite_lchild == ITE_NULL);
403 *splay->ist_rtreep = root;
405 assert(root->ite_rchild == ITE_NULL);
407 *splay->ist_ltreep = root;
441 ipc_tree_entry_t root, saved;
445 root = splay->ist_root;
446 assert(root != ITE_NULL);
449 ipc_splay_prim_assemble(root,
452 ipc_splay_prim_lookup(name, root, &root,
457 assert(root->ite_name == name);
458 assert(root == entry);
460 *splay->ist_ltreep = root->ite_lchild;
461 *splay->ist_rtreep = root->ite_rchild;
462 ite_free(root);
464 root = splay->ist_ltree;
467 if (root == ITE_NULL)
468 root = saved;
472 * to the root. Then add the saved right subtree.
475 ipc_splay_prim_lookup(MACH_PORT_LARGEST, root, &root,
478 ipc_splay_prim_assemble(root,
482 assert(root->ite_rchild == ITE_NULL);
483 root->ite_rchild = saved;
486 splay->ist_root = root;
487 if (root != ITE_NULL) {
488 splay->ist_name = root->ite_name;
512 ipc_tree_entry_t root;
518 root = splay->ist_root;
519 if (root != ITE_NULL) {
523 ipc_splay_prim_assemble(root,
526 ipc_splay_prim_lookup(name, root, &root,
531 if (root->ite_name < name) {
532 /* root goes into small */
534 *splay->ist_ltreep = root->ite_lchild;
536 root->ite_lchild = splay->ist_ltree;
537 assert(root->ite_rchild == ITE_NULL);
539 small->ist_root = root;
540 small->ist_name = root->ite_name;
546 root = splay->ist_rtree;
547 splay->ist_root = root;
548 if (root != ITE_NULL) {
549 splay->ist_name = root->ite_name;
554 /* root stays in splay */
556 *splay->ist_ltreep = root->ite_lchild;
557 root->ite_lchild = ITE_NULL;
559 splay->ist_root = root;
565 root = splay->ist_ltree;
566 small->ist_root = root;
567 if (root != ITE_NULL) {
568 small->ist_name = root->ite_name;
610 ipc_tree_entry_t root;
614 root = splay->ist_root;
615 if (root == ITE_NULL) {
616 root = sroot;
621 ipc_splay_prim_assemble(root,
625 root, &root,
630 ipc_splay_prim_assemble(root,
634 assert(root->ite_lchild == ITE_NULL);
635 assert(sroot->ite_name < root->ite_name);
636 root->ite_lchild = sroot;
639 splay->ist_root = root;
640 splay->ist_name = root->ite_name;
679 ipc_tree_entry_t root;
683 root = splay->ist_root;
684 if (root == ITE_NULL) {
691 ipc_splay_prim_assemble(root,
694 ipc_splay_prim_lookup(name, root, &root,
698 splay->ist_root = root;
701 rname = root->ite_name;
718 ((char *)&root->ite_rchild -
719 (char *)root));
732 ((char *)&root->ite_lchild -
733 (char *)root));
939 ipc_tree_entry_t root;
941 root = splay->ist_root;
942 if (root != ITE_NULL) {
943 splay->ist_name = root->ite_name;