From 80c5300bba21dcb5263a9243502ea4d870396463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?WineQ=E5=9C=889?= Date: Thu, 12 Mar 2020 15:50:12 +0800 Subject: [PATCH] Update tasks.c Why don't get xNextTaskUnblockTime directly in this way? --- tasks.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks.c b/tasks.c index d83db4b53..2bd8b4148 100644 --- a/tasks.c +++ b/tasks.c @@ -3964,8 +3964,7 @@ TCB_t *pxTCB; the item at the head of the delayed list. This is the time at which the task at the head of the delayed list should be removed from the Blocked state. */ - ( pxTCB ) = listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ - xNextTaskUnblockTime = listGET_LIST_ITEM_VALUE( &( ( pxTCB )->xStateListItem ) ); + xNextTaskUnblockTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxDelayedTaskList ); } } /*-----------------------------------------------------------*/