bugfix: Initialize uxTaskNumber at task initialization (#374)

* bugfix: Initialize uxTaskNumber at task initialization
pull/412/head
Laukik Hase 3 years ago committed by GitHub
parent 4896d6b1a1
commit 683811bd8c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2452,6 +2452,7 @@ uxstreambuffernumber
uxtaskgetnumberoftasks
uxtaskgetstackhighwatermark
uxtaskgetsystemstate
uxtaskgettasknumber
uxtasknumber
uxtaskpriorityget
uxtaskprioritygetfromisr
@ -2601,6 +2602,7 @@ vtaskremovefromunorderedeventlist
vtaskresume
vtaskresumefromisr
vtasksetapplicationtasktag
vtasksettasknumber
vtasksettimeout
vtasksettimeoutstate
vtaskstartscheduler

@ -1122,6 +1122,10 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
{
/* Add a counter into the TCB for tracing only. */
pxNewTCB->uxTCBNumber = uxTaskNumber;
/* Initialize the uxTaskNumber member to zero. It is utilized by the
* application using vTaskSetTaskNumber and uxTaskGetTaskNumber APIs. */
pxNewTCB->uxTaskNumber = 0;
}
#endif /* configUSE_TRACE_FACILITY */
traceTASK_CREATE( pxNewTCB );

Loading…
Cancel
Save