esp-idf/components/esp_ringbuf
RichFalk 6df7b049a3 esp_ringbuf: Fix assertion xQueueGenericSend queue.c
The release of the semaphore indicating the item was successfully sent must be the last semaphore released.  The receiver may be in another task and may delete the Ringbuffer (such as with a return code across tasks design pattern) if they are through with the Ringbuffer.

The function xRingbufferSendAcquire followed by xRingbufferSendComplete had the semaphores released in the proper order and that same pattern should have been used in xRingbufferSend and xRingbufferSendFromISR.  This commit fixes this order.

Issue (IDFGH-6030) #7716 describes the problem in more detail.

Closes IDFGH-6030, https://github.com/espressif/esp-idf/issues/7716
Closes IDFGH-6036, https://github.com/espressif/esp-idf/pull/7721
2021-12-23 15:53:48 +08:00
..
include/freertos ringbuf: Remove deprecated RingbufferType_t 2019-09-13 09:44:07 +10:00
test freertos: place xQueueGenericCreateStatic into flash 2020-04-22 16:06:13 +08:00
CMakeLists.txt components: use new component registration api 2019-06-21 19:53:29 +08:00
component.mk tools: implement linker script generation 2018-11-16 12:42:02 +08:00
linker.lf ldgen: update component linker fragment files 2019-04-04 15:57:34 +08:00
ringbuf.c esp_ringbuf: Fix assertion xQueueGenericSend queue.c 2021-12-23 15:53:48 +08:00