[riot-notifications] [RIOT-OS/RIOT] cpu/esp32/freertos: fix semaphore take (#11239)

Julian Holzwarth notifications at github.com
Tue Jul 30 18:44:47 CEST 2019


JulianHolzwarth commented on this pull request.



> @@ -94,7 +94,7 @@ BaseType_t xSemaphoreTake (SemaphoreHandle_t xSemaphore,
         case queueQUEUE_TYPE_MUTEX:
         {
             if (xTicksToWait == 0) {
-                return (mutex_trylock(mutex) == 0) ? pdTRUE : pdFALSE;
+                return (mutex_trylock(mutex) == 1) ? pdPASS : pdFAIL;

I was looking at the Reference Manual. It gave me more information about the function.
https://www.freertos.org/wp-content/uploads/2018/07/FreeRTOS_Reference_Manual_V10.0.0.pdf

Linked from here:
https://www.freertos.org/Documentation/RTOS_book.html

If you like `PdTrue` more I will change it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11239#discussion_r308828012
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190730/58b50d24/attachment.htm>


More information about the notifications mailing list