diff --git a/kernel/base/ipc/los_futex.c b/kernel/base/ipc/los_futex.c index 449326d2..e14123a3 100644 --- a/kernel/base/ipc/los_futex.c +++ b/kernel/base/ipc/los_futex.c @@ -301,15 +301,11 @@ STATIC VOID OsFutexInsertNewFutexKeyToHash(FutexNode *node) futexList != &(hashNode->lockList); futexList = futexList->pstNext) { headNode = OS_FUTEX_FROM_FUTEXLIST(futexList); - if (node->key > headNode->key) { - continue; - } else if (node->key < headNode->key) { + if (node->key <= headNode->key) { LOS_ListTailInsert(&(headNode->futexList), &(node->futexList)); break; } - - LOS_ListTailInsert(&(headNode->futexList), &(node->futexList)); - break; + } EXIT: