Lines Matching refs:pstX
41 STATIC VOID OsRbLeftRotateNode(LosRbTree *pstTree, LosRbNode *pstX);
49 STATIC VOID OsRbLeftRotateNode(LosRbTree *pstTree, LosRbNode *pstX) in OsRbLeftRotateNode() argument
55 if (pstTree == NULL || pstX == NULL) { in OsRbLeftRotateNode()
69 pstY = pstX->pstRight; in OsRbLeftRotateNode()
70 pstX->pstRight = pstY->pstLeft; in OsRbLeftRotateNode()
71 pstY->pstLeft->pstParent = pstX; in OsRbLeftRotateNode()
72 pstY->pstParent = pstX->pstParent; in OsRbLeftRotateNode()
73 if (pstNilT == pstX->pstParent) { in OsRbLeftRotateNode()
76 if (pstX == pstX->pstParent->pstLeft) { in OsRbLeftRotateNode()
77 pstX->pstParent->pstLeft = pstY; in OsRbLeftRotateNode()
79 pstX->pstParent->pstRight = pstY; in OsRbLeftRotateNode()
82 pstX->pstParent = pstY; in OsRbLeftRotateNode()
83 pstY->pstLeft = pstX; in OsRbLeftRotateNode()
90 LosRbNode *pstX = NULL; in OsRbRightRotateNode() local
109 pstX = pstY->pstLeft; in OsRbRightRotateNode()
110 pstY->pstLeft = pstX->pstRight; in OsRbRightRotateNode()
111 pstX->pstRight->pstParent = pstY; in OsRbRightRotateNode()
112 pstX->pstParent = pstY->pstParent; in OsRbRightRotateNode()
114 pstTree->pstRoot = pstX; in OsRbRightRotateNode()
117 pstY->pstParent->pstRight = pstX; in OsRbRightRotateNode()
119 pstY->pstParent->pstLeft = pstX; in OsRbRightRotateNode()
122 pstY->pstParent = pstX; in OsRbRightRotateNode()
123 pstX->pstRight = pstY; in OsRbRightRotateNode()
133 LosRbNode *pstX = NULL; in OsRbInsertNodeFixup() local
139 pstX = (LosRbNode *)pstData; in OsRbInsertNodeFixup()
142 while (LOS_RB_RED == pstX->pstParent->lColor) { in OsRbInsertNodeFixup()
143 pstParent = pstX->pstParent; in OsRbInsertNodeFixup()
152 pstX = pstGParent; in OsRbInsertNodeFixup()
156 if (pstParent->pstRight == pstX) { in OsRbInsertNodeFixup()
157 pstX = pstParent; in OsRbInsertNodeFixup()
158 OsRbLeftRotateNode(pstTree, pstX); in OsRbInsertNodeFixup()
161 pstX->pstParent->lColor = LOS_RB_BLACK; in OsRbInsertNodeFixup()
170 pstX = pstGParent; in OsRbInsertNodeFixup()
174 if (pstParent->pstLeft == pstX) { in OsRbInsertNodeFixup()
175 pstX = pstParent; in OsRbInsertNodeFixup()
176 OsRbRightRotateNode(pstTree, pstX); in OsRbInsertNodeFixup()
179 pstX->pstParent->lColor = LOS_RB_BLACK; in OsRbInsertNodeFixup()
659 LosRbNode *pstX = NULL; in LOS_RbGetNode() local
677 pstX = pstY; in LOS_RbGetNode()
679 while (pstX != pstNilT) { in LOS_RbGetNode()
680 pNodeKey = pstTree->pfGetKey(pstX); in LOS_RbGetNode()
684 *ppstNode = pstX; in LOS_RbGetNode()
688 pstY = pstX; in LOS_RbGetNode()
689 pstX = pstX->pstLeft; in LOS_RbGetNode()
691 pstY = pstX; in LOS_RbGetNode()
692 pstX = pstX->pstRight; in LOS_RbGetNode()
709 LosRbNode *pstX = NULL; in LOS_RbAddNode() local
719 ulSearchNode = LOS_RbGetNode(pstTree, pNodeKey, &pstX); in LOS_RbAddNode()
724 if (NULL == pstX) { in LOS_RbAddNode()
728 LOS_RbInsertOneNodeProcess(pstTree, pstX, pstNew); in LOS_RbAddNode()