Semaphore from xSemaphoreCreateMutex not blocking higher priority task

joehinkle wrote on Saturday, November 10, 2018:

I dump debug printf statements out thru a uart.

I have created a Semaphore using xSemaphoreCreateMutex() and use it to manage access to my various printf type functions (eg: printfA - prints a standard line, while printfB prints a block of data.

Both printfA and printfB have xSemaphoreTake and xSemaphoreGive to control access and use the same Semaphore.

What I am experiencing is task with lo priority is using printfB to write of a block of data. That lo priority task has acquired the semaphore to begin writing.

During the time the lo priority task is printing its data block, a hi priority becomes active and calls printfA (which is controlled by the same semaphore. BUT … it is NOT blocked as I thought it would be – I had thought the lo priority thread would be raised to the hi priority thread level and continue writing data until it called xSemaphoreGive thereby transferring control back to the hi priority thread.

So – my understanding is incorrect or I have a problem somewhere because the Mutex Semaphore is not blocking the hi priority thread when it was taken by a lo priority thread.

Am I missing a config setting some place or is my understanding incorrect.


joehinkle wrote on Saturday, November 10, 2018:

Never mind.

Getting old and head up ass.

All is well.