Update tasks.c (#24)

An error on trace argument.
In "xTaskPriorityDisinherit", the disinherit priority should be "pxTCB->uxBasePriority".
And, in "vTaskPriorityDisinheritAfterTimeout", the disinherit priority should be "uxPriorityToUse", which might not be "pxTCB->uxBasePriority".
This commit is contained in:
WineQ圈9 2020-03-15 02:58:19 +08:00 committed by GitHub
parent 9b02ee0af2
commit 180d0b8ee3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4229,7 +4229,7 @@ TCB_t *pxTCB;
/* Disinherit the priority, remembering the previous /* Disinherit the priority, remembering the previous
priority to facilitate determining the subject task's priority to facilitate determining the subject task's
state. */ state. */
traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); traceTASK_PRIORITY_DISINHERIT( pxTCB, uxPriorityToUse );
uxPriorityUsedOnEntry = pxTCB->uxPriority; uxPriorityUsedOnEntry = pxTCB->uxPriority;
pxTCB->uxPriority = uxPriorityToUse; pxTCB->uxPriority = uxPriorityToUse;