esp-idf/components/freertos
Darian Leung 4bfa30967f freeRTOS/Re-factor ring buffers
This fixes multiple bugs with ring buffers and re-factors the code. The public
API has not changed, however the underlying implementation have various private
functions have been changed. The following behavioral changes have been made

-   Size of ring buffers for No-Split/Allow-Split buffers will not be rounded
    up to the nearest 32-bit aligned size. This was done to simplify the
    implementation

-   Item size for No-Split/Allow-Split buffers will also be rounded up to the
    nearest 32-bit aligned size.

The following bugs have been fixed

-   In copyItemToRingbufAllowSplit(), when copying an item where the aligned
    size is smaller than the remaining length, the function does not consider
    the case where the true size of the item is less than 4 bytes.

-   The copy functions will automatically wrap around the write pointers when
    the remaining length of the buffer is not large enough to fit a header, but
    does not consider if wrapping around will cause an overlap with the read
    pointer. This will make a full buffer be mistaken for an empty buffer

closes #1711
-   xRingbufferSend() can get stuck in a infinite loop when the size of the
    free memory is larger than the needed_size, but too small to fit in the ring
    buffer due to alignment and extra overhead of wrapping around.

closes #1846
-   Fixed documentation with ring buffer queue set API

-   Adding and removing from queue set does not consider the case where the
    read/write semaphores actually hold a value.

The following functions have been deprecated
    - xRingbufferIsNextItemWrapped() due to lack of thread safety
    - xRingbufferAddToQueueSetWrite() and xRingbufferRemoveFromQueueSetWrite()
    as adding the queue sets only work under receive operations.

The following functions have been added
    - xRingbufferReceiveSplit() and xRingbufferReceiveSplitFromISR() as a thread
    safe way to receive from allow-split buffers
    - vRingbufferGetInfo()

Documentation for ring buffers has also been added.
2018-05-21 01:04:58 +00:00
..
include/freertos freeRTOS/Re-factor ring buffers 2018-05-21 01:04:58 +00:00
test freeRTOS/Re-factor ring buffers 2018-05-21 01:04:58 +00:00
component.mk build system: Restore ifdef/ifndef in Makefiles, clean up examples build 2017-09-05 16:11:03 +10:00
croutine.c Add UNTESTED_FUNCTION() call to untested functions, make Kconfig option to enable that to map to assert() 2016-09-27 11:36:30 +08:00
event_groups.c freertos/backport and test v9.0.0 functions 2017-11-23 14:18:09 +08:00
FreeRTOS-openocd.c freertos: place uxTopUsedPriority into DRAM 2017-09-11 20:15:27 +08:00
Kconfig freertos: Bump default idle task stack size to 1536 bytes 2018-05-17 10:37:24 +08:00
license.txt Initial public version 2016-08-17 23:08:22 +08:00
list.c Initial public version 2016-08-17 23:08:22 +08:00
port.c Merge branch 'feature/tls_support' into 'master' 2018-02-09 12:34:20 +08:00
portasm.S pm: support for tracing using GPIOs 2017-10-18 14:19:18 +08:00
portmux_impl.h Especially when internal memory fills up, some FreeRTOS structures (queues etc) get allocated in psram. These structures also contain a spinlock, which needs an atomic-compare-swap operation to work. The psram hardware, however, does not support this operation. As a workaround, this patch detects these spinlocks and will, instead of S32C1I, use equivalent C-code to simulate the behaviour, with an (internal) mux for atomicity. 2018-02-02 17:11:06 +08:00
portmux_impl.inc.h Especially when internal memory fills up, some FreeRTOS structures (queues etc) get allocated in psram. These structures also contain a spinlock, which needs an atomic-compare-swap operation to work. The psram hardware, however, does not support this operation. As a workaround, this patch detects these spinlocks and will, instead of S32C1I, use equivalent C-code to simulate the behaviour, with an (internal) mux for atomicity. 2018-02-02 17:11:06 +08:00
queue.c freertos/backport and test v9.0.0 functions 2017-11-23 14:18:09 +08:00
readme_xtensa.txt Initial public version 2016-08-17 23:08:22 +08:00
ringbuf.c freeRTOS/Re-factor ring buffers 2018-05-21 01:04:58 +00:00
stdint.readme Initial public version 2016-08-17 23:08:22 +08:00
tasks.c freertos: portCLEAN_UP_TCB should be performed before freeing tcb memory 2018-04-19 18:28:55 +05:30
timers.c freertos/backport and test v9.0.0 functions 2017-11-23 14:18:09 +08:00
xtensa_context.S fix bug that files missing commit in MR 773 2017-05-31 19:37:39 +08:00
xtensa_init.c freertos: deprecate XT_CLOCK_FREQ 2017-10-18 14:19:19 +08:00
xtensa_intr_asm.S Replace non-multicore-aware rom funcs with multicore-aware funcs, ESP_LOG->ESP_EARLY_LOG fix, reserve ints used in wireless libs. Fixes WiFi crashing 2016-12-13 13:24:01 +08:00
xtensa_intr.c esp32: SEGGER SystemView Tracing Support 2017-06-27 20:52:43 +03:00
xtensa_overlay_os_hook.c Initial public version 2016-08-17 23:08:22 +08:00
xtensa_vector_defaults.S panic handler: Print correct PC & backtrace for debug exceptions 2017-10-23 15:46:43 +08:00
xtensa_vectors.S pm: support for tracing using GPIOs 2017-10-18 14:19:18 +08:00