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

Julian Holzwarth notifications at github.com
Tue Jul 30 19:25:14 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;

The  latest official release http://www.freertos.org/a00104.html has `return pdPASS;`
and
https://github.com/aws/amazon-freertos/blob/edc41fb223b8f9529162651a7c0459b10b450164/freertos_kernel/queue.c#L1414
has the same.
(The other return is `return errQUEUE_EMPTY`)


-- 
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_r308845541
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190730/3948fb40/attachment.htm>


More information about the notifications mailing list