esp-idf/components/freertos/test
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
..
component.mk add unit tests to esp-idf 2016-11-22 14:45:50 +08:00
test_freertos.c unit tests: fix warnings, build with -Werror 2017-10-19 21:35:23 +08:00
test_freertos_backported_functions.c freertos/backport and test v9.0.0 functions 2017-11-23 14:18:09 +08:00
test_freertos_debug_functions.c unit tests: fix queue registry test 2017-11-14 23:53:08 +08:00
test_freertos_eventgroups.c freertos/Fix Event Group ISR test case 2018-01-02 18:57:28 +08:00
test_freertos_get_state.c freertos: Test untested functions 2017-11-06 15:31:01 +08:00
test_freertos_isinisrcontext.c unit test: adapt tests to single core configuration 2017-10-19 21:35:21 +08:00
test_freertos_task_delay_until.c freertos: Test untested functions 2017-11-06 15:31:01 +08:00
test_freertos_task_delete.c freertos: prvCheckTasksWaitingTermination bugfix 2017-12-26 19:03:49 +08:00
test_freertos_task_notify.c freertos: Test untested functions 2017-11-06 15:31:01 +08:00
test_freertos_trace_utilities.c freertos/make trace facility configurable 2017-10-20 15:17:17 +08:00
test_newlib_reent.c unit test: adapt tests to single core configuration 2017-10-19 21:35:21 +08:00
test_panic.c esp32: add [ignore] tag to some unit test cases for CI 2017-01-18 17:08:20 +08:00
test_preemption.c unit test: adapt tests to single core configuration 2017-10-19 21:35:21 +08:00
test_ringbuf.c freeRTOS/Re-factor ring buffers 2018-05-21 01:04:58 +00:00
test_spinlocks.c 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
test_suspend_scheduler.c unit_tests/Update unit test timer divider 2017-10-30 19:42:16 +08:00
test_task_priorities.c freertos: Mark uxTaskPriorityGet() as tested 2017-05-29 16:19:00 +10:00
test_task_suspend_resume.c unit_tests/Update unit test timer divider 2017-10-30 19:42:16 +08:00
test_tasks_snapshot.c esp32: Fixes crash during core dump. 2017-09-11 17:20:42 +03:00
test_thread_local.c freertos: Adds C11 TLS support 2018-02-07 18:46:57 +03:00
test_timers.c Unit tests: Add FreeRTOS timer tests 2017-05-05 14:38:15 +10:00