Hello I have a question regarding the use of configUSE_NEWLIB_REENTRANT. Let me tell you first, that I have not used it before, so I am not familiar with all the details. All I understand is that it embedds a struct compatible with reent.h in the TCB so one does not have to allocate and point to that struct manually. Correct me if I am wrong here…
Now the question: Suppose a simple case where I would like to use reentrancy features, so i set configUSE_NEWLIB_REENTRANT to 1. In a task lets say that all I do is use sprintf in the reentrant version :_sprintf_r. This version demands as second argument a pointer to the reent struct. what is the correct way to use this version of sprintf in this case? dig out the reent pointer from TCB and pass it by hand? Something like _sprintf_r(buff,pxTCB->xNewLib_reent,"…"); ??
Maybe what I write irrelevant … but I could use an example to get started.