I am writing code that will be used by several threads (a circular buffer module) so I need to protect a few lines of ‘critical section’ code.
My question is which method (ie taskENTER_CRITICAL() vs vTaskSuspendAll()) is ‘preferred’
My ‘requiremnets’ are
1. minimum blocking of interrupts…
2. minimum execution time of the chosen enter/exit fuctions
The module will not be used in ISRs so does not need to be protected from interrupts - in fact, I would prefer that interrupts continue to run while I am in the critical section.
I have looked through the documentation of the FreeRTOS web site but found no mention of which method is prefered & when.
Thank you in advance.