]> granicus.if.org Git - esp-idf/commitdiff
freertos: minor change according to review comments
authorLiu Zhi Fu <liuzhifu@espressif.com>
Thu, 22 Dec 2016 02:51:40 +0000 (10:51 +0800)
committerLiu Zhi Fu <liuzhifu@espressif.com>
Thu, 22 Dec 2016 02:51:40 +0000 (10:51 +0800)
components/freertos/tasks.c

index baaccb43e588fcc8853088ca9a73b0107ff89f67..f2bdf8ccb0abbce462be2595edafa5373901e99a 100644 (file)
@@ -3499,24 +3499,20 @@ static void prvCheckTasksWaitingTermination( void )
                taskENTER_CRITICAL(&xTaskQueueMutex);
                while( uxTasksDeleted > ( UBaseType_t ) 0U )
                {
-                       //taskENTER_CRITICAL(&xTaskQueueMutex);
                        {
                                xListIsEmpty = listLIST_IS_EMPTY( &xTasksWaitingTermination );
                        }
-                       //taskEXIT_CRITICAL(&xTaskQueueMutex);
 
                        if( xListIsEmpty == pdFALSE )
                        {
                                TCB_t *pxTCB;
 
-                               //taskENTER_CRITICAL(&xTaskQueueMutex);
                                {
                                        pxTCB = ( TCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) );
                                        ( void ) uxListRemove( &( pxTCB->xGenericListItem ) );
                                        --uxCurrentNumberOfTasks;
                                        --uxTasksDeleted;
                                }
-                               //taskEXIT_CRITICAL(&xTaskQueueMutex);
                                
                                #if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 ) && ( configTHREAD_LOCAL_STORAGE_DELETE_CALLBACKS )
                                {
@@ -3809,9 +3805,6 @@ TCB_t *pxTCB;
        TaskHandle_t xReturn;
 
                 vPortCPUAcquireMutex(&xTaskQueueMutex);
-               /* A critical section is not required as this is not called from
-               an interrupt and the current TCB will always be the same for any
-               individual execution thread. */
                xReturn = pxCurrentTCB[ xPortGetCoreID() ];
                 vPortCPUReleaseMutex(&xTaskQueueMutex);