How to get the active task ID?

I want to put a printf in one function to see which tasks are calling it. So is there anyway to get the active task ID? Thanks Paul

How to get the active task ID?

extern void *pxCurrentTCB might work if you linker will allow it – most will.  Other than that add a get function to task.c to return pxCurrentTCB, or pxCurrentTCB->uxTCBNumber for the current number, or even pxCurrenTCB->pcTaskName for the name of the current task. Have fun :-) Dave.