@@ -30,9 +30,9 @@ static kernel_member_setting_t g_kernel_member_setting[KERNEL_MEMBER_NUMBER] = {
3030 [KERNEL_MEMBER_THREAD ] = {KERNEL_MEMBER_MAP_1 , (SBITS (KERNEL_MEMBER_LIST_THREAD_WAIT , KERNEL_MEMBER_LIST_THREAD_EXIT ))},
3131 [KERNEL_MEMBER_TIMER_INTERNAL ] = {KERNEL_MEMBER_MAP_2 , (SBITS (KERNEL_MEMBER_LIST_TIMER_STOP , KERNEL_MEMBER_LIST_TIMER_RUN ))},
3232 [KERNEL_MEMBER_TIMER ] = {KERNEL_MEMBER_MAP_3 , (SBITS (KERNEL_MEMBER_LIST_TIMER_STOP , KERNEL_MEMBER_LIST_TIMER_RUN ))},
33- [KERNEL_MEMBER_SEMAPHORE ] = {KERNEL_MEMBER_MAP_4 , (SBITS ( KERNEL_MEMBER_LIST_SEMAPHORE_LOCK , KERNEL_MEMBER_LIST_SEMAPHORE_UNLOCK ))},
33+ [KERNEL_MEMBER_SEMAPHORE ] = {KERNEL_MEMBER_MAP_4 , (SBIT ( KERNEL_MEMBER_LIST_SEMAPHORE_INIT ))},
3434 [KERNEL_MEMBER_MUTEX ] = {KERNEL_MEMBER_MAP_5 , (SBITS (KERNEL_MEMBER_LIST_MUTEX_LOCK , KERNEL_MEMBER_LIST_MUTEX_UNLOCK ))},
35- [KERNEL_MEMBER_EVENT ] = {KERNEL_MEMBER_MAP_6 , (SBITS (KERNEL_MEMBER_LIST_EVENT_INIT , KERNEL_MEMBER_LIST_EVENT_ACTIVE ))},
35+ [KERNEL_MEMBER_EVENT ] = {KERNEL_MEMBER_MAP_6 , (SBIT (KERNEL_MEMBER_LIST_EVENT_INIT ))},
3636 [KERNEL_MEMBER_QUEUE ] = {KERNEL_MEMBER_MAP_7 , (SBIT (KERNEL_MEMBER_LIST_QUEUE_INIT ))},
3737 [KERNEL_MEMBER_POOL ] = {KERNEL_MEMBER_MAP_8 , (SBIT (KERNEL_MEMBER_LIST_POOL_INIT ))},
3838};
@@ -348,6 +348,21 @@ u32_t kernel_schedule_time_get(void)
348348 return _kernel_pendsv_time_get ();
349349}
350350
351+ /**
352+ * @brief Push one semaphore context into lock list.
353+ *
354+ * @param pCurHead The pointer of the semaphore linker head.
355+ */
356+ void kernel_semaphore_list_transfer_toInit (linker_head_t * pCurHead )
357+ {
358+ ENTER_CRITICAL_SECTION ();
359+
360+ list_t * pToLockList = (list_t * )(list_t * )kernel_member_list_get (KERNEL_MEMBER_SEMAPHORE , KERNEL_MEMBER_LIST_SEMAPHORE_INIT );
361+ linker_list_transaction_common (& pCurHead -> linker , pToLockList , LIST_TAIL );
362+
363+ EXIT_CRITICAL_SECTION ();
364+ }
365+
351366/**
352367 * @brief kernel thread use percent value take.
353368 *
@@ -729,21 +744,6 @@ void kernel_thread_list_transfer_toPend(linker_head_t *pCurHead)
729744 EXIT_CRITICAL_SECTION ();
730745}
731746
732- /**
733- * @brief Push one semaphore context into lock list.
734- *
735- * @param pCurHead The pointer of the semaphore linker head.
736- */
737- void kernel_semaphore_list_transfer_toLock (linker_head_t * pCurHead )
738- {
739- ENTER_CRITICAL_SECTION ();
740-
741- list_t * pToLockList = (list_t * )(list_t * )kernel_member_list_get (KERNEL_MEMBER_SEMAPHORE , KERNEL_MEMBER_LIST_SEMAPHORE_LOCK );
742- linker_list_transaction_common (& pCurHead -> linker , pToLockList , LIST_TAIL );
743-
744- EXIT_CRITICAL_SECTION ();
745- }
746-
747747/**
748748 * @brief The thread is trying to exit into suspend.
749749 *
0 commit comments