Lines Matching defs:current
755 * If "delete" is TRUE, then the current entry
765 ipc_tree_entry_t current, parent;
769 current = splay->ist_root;
770 if (current != ITE_NULL) {
771 ipc_splay_prim_assemble(current,
777 while (current->ite_lchild != ITE_NULL) {
780 next = current->ite_lchild;
781 current->ite_lchild = parent;
782 parent = current;
783 current = next;
786 splay->ist_ltree = current;
790 return current;
798 ipc_tree_entry_t current, parent;
802 current = splay->ist_ltree;
804 assert(current != ITE_NULL);
809 /* we must delete current and patch the tree */
811 if (current->ite_lchild == ITE_NULL) {
812 if (current->ite_rchild == ITE_NULL) {
816 ite_free(current);
822 if (current->ite_name < parent->ite_name) {
823 ite_free(current);
825 current = parent;
826 parent = current->ite_lchild;
827 current->ite_lchild = ITE_NULL;
830 ite_free(current);
832 current = parent;
833 parent = current->ite_rchild;
834 current->ite_rchild = ITE_NULL;
840 prev = current;
841 current = current->ite_rchild;
846 if (current->ite_rchild == ITE_NULL) {
849 prev = current;
850 current = current->ite_lchild;
858 /* replace current with largest of left children */
860 prev = current;
862 current->ite_lchild, ¤t,
864 ipc_splay_prim_assemble(current,
867 assert(current->ite_rchild == ITE_NULL);
868 current->ite_rchild = prev->ite_rchild;
884 if (current->ite_lchild != ITE_NULL) {
887 next = current->ite_lchild;
888 current->ite_lchild = parent;
889 parent = current;
890 current = next;
895 splay->ist_ltree = current;
897 return current;
900 if (current->ite_rchild != ITE_NULL) {
903 next = current->ite_rchild;
904 current->ite_rchild = parent;
905 parent = current;
906 current = next;
912 splay->ist_root = current;
916 if (current->ite_name < parent->ite_name) {
919 prev = current;
920 current = parent;
921 parent = current->ite_lchild;
922 current->ite_lchild = prev;
927 prev = current;
928 current = parent;
929 parent = current->ite_rchild;
930 current->ite_rchild = prev;