mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-14 00:37:44 -04:00
Add test and correct code for the unusual case of a task using an event group to synchronise only with itself.
Add critical sections around call to prvResetNextTaskUnblockTime() that can occur from within a task.
This commit is contained in:
parent
ef7f3c5320
commit
82207ebffa
3 changed files with 43 additions and 3 deletions
|
@ -179,7 +179,7 @@ BaseType_t xTimeoutOccurred = pdFALSE;
|
|||
|
||||
/* Rendezvous always clear the bits. They will have been cleared
|
||||
already unless this is the only task in the rendezvous. */
|
||||
pxEventBits->uxEventBits &= uxBitsToWaitFor;
|
||||
pxEventBits->uxEventBits &= ~uxBitsToWaitFor;
|
||||
|
||||
xTicksToWait = 0;
|
||||
}
|
||||
|
|
|
@ -760,7 +760,11 @@ TCB_t * pxNewTCB;
|
|||
{
|
||||
/* Reset the next expected unblock time in case it referred to
|
||||
the task that has just been deleted. */
|
||||
prvResetNextTaskUnblockTime();
|
||||
taskENTER_CRITICAL();
|
||||
{
|
||||
prvResetNextTaskUnblockTime();
|
||||
}
|
||||
taskEXIT_CRITICAL();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1259,7 +1263,11 @@ TCB_t * pxNewTCB;
|
|||
/* A task other than the currently running task was suspended,
|
||||
reset the next expected unblock time in case it referred to the
|
||||
task that is now in the Suspended state. */
|
||||
prvResetNextTaskUnblockTime();
|
||||
taskENTER_CRITICAL();
|
||||
{
|
||||
prvResetNextTaskUnblockTime();
|
||||
}
|
||||
taskEXIT_CRITICAL();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue