• Home
  • Raw
  • Download

Lines Matching refs:pstParent

53     LosRbNode *pstParent = NULL;  in OsRbLeftRotateNode()  local
68 pstParent = pstNilT->pstParent; 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()
84 pstNilT->pstParent = pstParent; in OsRbLeftRotateNode()
92 LosRbNode *pstParent = NULL; in OsRbRightRotateNode() local
108 pstParent = pstNilT->pstParent; in OsRbRightRotateNode()
111 pstX->pstRight->pstParent = pstY; in OsRbRightRotateNode()
112 pstX->pstParent = pstY->pstParent; in OsRbRightRotateNode()
113 if (pstNilT == pstY->pstParent) { in OsRbRightRotateNode()
116 if (pstY == pstY->pstParent->pstRight) { in OsRbRightRotateNode()
117 pstY->pstParent->pstRight = pstX; in OsRbRightRotateNode()
119 pstY->pstParent->pstLeft = pstX; in OsRbRightRotateNode()
122 pstY->pstParent = pstX; in OsRbRightRotateNode()
124 pstNilT->pstParent = pstParent; in OsRbRightRotateNode()
130 LosRbNode *pstParent = NULL; in OsRbInsertNodeFixup() local
142 while (LOS_RB_RED == pstX->pstParent->lColor) { in OsRbInsertNodeFixup()
143 pstParent = pstX->pstParent; in OsRbInsertNodeFixup()
144 pstGParent = pstParent->pstParent; in OsRbInsertNodeFixup()
146 if (pstParent == pstGParent->pstLeft) { in OsRbInsertNodeFixup()
150 pstParent->lColor = LOS_RB_BLACK; in OsRbInsertNodeFixup()
156 if (pstParent->pstRight == pstX) { in OsRbInsertNodeFixup()
157 pstX = pstParent; in OsRbInsertNodeFixup()
161 pstX->pstParent->lColor = LOS_RB_BLACK; in OsRbInsertNodeFixup()
168 pstParent->lColor = LOS_RB_BLACK; in OsRbInsertNodeFixup()
174 if (pstParent->pstLeft == pstX) { in OsRbInsertNodeFixup()
175 pstX = pstParent; in OsRbInsertNodeFixup()
179 pstX->pstParent->lColor = LOS_RB_BLACK; in OsRbInsertNodeFixup()
198 if (pstNode->pstParent->pstLeft == pstNode) { in OsRbDeleteNodeFixup()
199 pstW = pstNode->pstParent->pstRight; in OsRbDeleteNodeFixup()
202 pstNode->pstParent->lColor = LOS_RB_RED; in OsRbDeleteNodeFixup()
203 OsRbLeftRotateNode(pstTree, pstNode->pstParent); in OsRbDeleteNodeFixup()
204 pstW = pstNode->pstParent->pstRight; in OsRbDeleteNodeFixup()
209 pstNode = pstNode->pstParent; in OsRbDeleteNodeFixup()
215 pstW = pstNode->pstParent->pstRight; in OsRbDeleteNodeFixup()
217 pstW->lColor = pstNode->pstParent->lColor; in OsRbDeleteNodeFixup()
218 pstNode->pstParent->lColor = LOS_RB_BLACK; in OsRbDeleteNodeFixup()
220 OsRbLeftRotateNode(pstTree, pstNode->pstParent); in OsRbDeleteNodeFixup()
224 pstW = pstNode->pstParent->pstLeft; in OsRbDeleteNodeFixup()
227 pstNode->pstParent->lColor = LOS_RB_RED; in OsRbDeleteNodeFixup()
228 OsRbRightRotateNode(pstTree, pstNode->pstParent); in OsRbDeleteNodeFixup()
229 pstW = pstNode->pstParent->pstLeft; in OsRbDeleteNodeFixup()
233 pstNode = pstNode->pstParent; in OsRbDeleteNodeFixup()
239 pstW = pstNode->pstParent->pstLeft; in OsRbDeleteNodeFixup()
241 pstW->lColor = pstNode->pstParent->lColor; in OsRbDeleteNodeFixup()
242 pstNode->pstParent->lColor = LOS_RB_BLACK; in OsRbDeleteNodeFixup()
244 OsRbRightRotateNode(pstTree, pstNode->pstParent); in OsRbDeleteNodeFixup()
280 if ((pstZ->pstParent == pstNilT) && (pstZ->pstLeft == pstNilT) && (pstZ->pstRight == pstNilT) && in OsRbDeleteNode()
303 pstChild->pstParent = pstZ->pstParent; in OsRbDeleteNode()
305 if (pstNilT == pstZ->pstParent) { in OsRbDeleteNode()
308 if (pstZ->pstParent->pstLeft == pstZ) { in OsRbDeleteNode()
309 pstZ->pstParent->pstLeft = pstChild; in OsRbDeleteNode()
311 pstZ->pstParent->pstRight = pstChild; in OsRbDeleteNode()
321 pstZ->pstLeft = pstZ->pstRight = pstZ->pstParent = pstNilT; in OsRbDeleteNode()
348 pstChild->pstParent = pstZ->pstParent; in OsRbDeleteNode()
350 if (pstNilT == pstZ->pstParent) { in OsRbDeleteNode()
354 if (pstZ->pstParent->pstLeft == pstZ) { in OsRbDeleteNode()
355 pstZ->pstParent->pstLeft = pstChild; in OsRbDeleteNode()
357 pstZ->pstParent->pstRight = pstChild; in OsRbDeleteNode()
362 pstZ->pstParent = pstDel->pstParent; in OsRbDeleteNode()
367 if (pstNilT == pstDel->pstParent) { in OsRbDeleteNode()
371 if (pstDel->pstParent->pstLeft == pstDel) { in OsRbDeleteNode()
372 pstDel->pstParent->pstLeft = pstZ; in OsRbDeleteNode()
374 pstDel->pstParent->pstRight = pstZ; in OsRbDeleteNode()
378 pstDel->pstLeft->pstParent = pstZ; in OsRbDeleteNode()
379 pstDel->pstRight->pstParent = pstZ; in OsRbDeleteNode()
387 pstDel->pstLeft = pstDel->pstRight = pstDel->pstParent = pstNilT; in OsRbDeleteNode()
403 pstTree->stNilT.pstParent = NULL; /* Not NULL when tree isn't empty */ in OsRbInitTree()
497 VOID LOS_RbInsertOneNodeProcess(LosRbTree *pstTree, LosRbNode *pstParent, LosRbNode *pstNew) in LOS_RbInsertOneNodeProcess() argument
506 if ((pstNew->pstParent = pstParent) == pstNilT) { in LOS_RbInsertOneNodeProcess()
510 pKey = pstTree->pfGetKey(pstParent); in LOS_RbInsertOneNodeProcess()
513 pstParent->pstLeft = pstNew; in LOS_RbInsertOneNodeProcess()
515 pstParent->pstRight = pstNew; in LOS_RbInsertOneNodeProcess()
621 pstY = pstNode->pstParent; in LOS_RbSuccessorNode()
625 pstY = pstY->pstParent; in LOS_RbSuccessorNode()