zephyr/include
Krzysztof Chruscinski 1e46bb3bb5 lib: os: ring_buffer: Allow using full buffer capacity
Previously, ring buffer had capacity of provided buffer size - 1. This
trick was used to distinguish between empty and full states. It had one
drawback: ring buffer could not be used as a pool of equal sized buffers
(using ring_buf_put_claim and ring_buf_get_claim).
Reworked internals to use non wrapping head and tail. Since they are
non wrapping, there is no issue with distinguishing between empty and
full. Since this appraoch would be vulnerable to wrapping on 32 bit
boundary, added a mechanism which periodically reduces all indexes to
avoid 32 bit wrapping.

After this rework, buffer has one byte more capacity. Simple test shows
slight performance improvement.

Updated tests to reflect increased capacity and added test to check if
it is possible to continuesly allocated 2 buffers of half ring buffer
size.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2020-11-11 13:17:49 +01:00
..
app_memory userspace: update k_mem_domain_add_partition docs 2020-11-05 09:33:40 -05:00
arch arch: arc: add support of ARConnect inter-core debug unit 2020-11-09 15:52:15 -06:00
audio device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
bluetooth Bluetooth: add destroy callback to indication 2020-11-10 11:21:46 +01:00
canbus subsys: canopen: Add a wrapper to avoid passing device to CO_init 2020-09-02 13:48:13 +02:00
cmsis_rtos_v1
cmsis_rtos_v2
console device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
crypto device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
data json: Add top-level array encoding support 2020-06-19 18:21:27 +02:00
debug debug: x86: Add gdbstub for X86 2020-09-02 20:54:57 -04:00
devicetree devicetree: rename header to reflect that io-channels are not ADC-only 2020-10-19 17:21:33 +02:00
dfu dfu: img_util: Add flash integrity check 2020-09-03 17:56:02 +02:00
disk device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
display device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
drivers drivers: add infrastructure for regulator devices 2020-10-28 15:22:53 +01:00
dt-bindings drivers: display: ili9xxx: generalize ILI display driver 2020-11-10 15:52:12 -06:00
fs fs: Add support for mount flags 2020-11-06 13:10:13 -05:00
linker net: dns: dns-sd: support dns service discovery 2020-11-09 16:15:02 -08:00
logging logging: make log_backend_std header public 2020-10-21 10:21:05 -04:00
lorawan lorawan,lora: fix C++ compilation/linking errors 2020-10-15 11:08:07 +02:00
mgmt mgmt/osdp: CP: Unify osdp_cp_send_cmd_*() as osdp_cp_send_command() 2020-10-21 17:36:16 +02:00
net net: lwm2m: Add path generation macro 2020-11-10 14:10:44 +02:00
posix include/posix: fix extern "C" placement 2020-10-13 10:05:30 -05:00
power
random random: Add syscalls for random subsystem 2020-07-08 21:05:36 -04:00
settings settings: disallow modifying the content of a static subtree name 2020-07-27 19:03:44 +02:00
shell shell: documentation update 2020-10-08 10:12:25 -04:00
stats
storage storage/flash_map: Added function for get erased byte value 2020-10-30 15:53:38 +01:00
sys lib: os: ring_buffer: Allow using full buffer capacity 2020-11-11 13:17:49 +01:00
timing timing: introduce timing functions as a generic feature 2020-09-05 13:28:38 -05:00
toolchain sys: util: Add clamp macro 2020-11-05 12:12:17 +01:00
tracing tracing: trace mutex/semaphore using dedicated calls 2020-08-24 13:21:12 +02:00
usb usb: samples: Add Extension descriptor to webUSB sample. 2020-10-30 15:56:13 +01:00
zephyr
cache.h syscalls: Add system call for cache flush & invalidate 2020-08-04 17:26:45 -04:00
device.h device: deprecate DEVICE_INIT 2020-11-10 08:38:09 -06:00
devicetree.h devicetree: add a name for an invalid node identifier 2020-10-19 18:14:11 +02:00
ec_host_cmd.h include: remove enum build assert 2020-10-02 11:44:39 +02:00
emul.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
exc_handle.h
fatal.h
generated_dts_board.h
init.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
irq_nextlevel.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
irq_offload.h irq: Change offload API to take a constant parameter 2020-09-02 13:48:13 +02:00
irq.h irq: Change dynamic API to take a constant parameter 2020-09-02 13:48:13 +02:00
kernel_includes.h kernel: move kernel object APIs to own header 2020-10-12 12:21:46 -04:00
kernel_structs.h kernel: move k_heap definition 2020-10-06 19:56:51 -04:00
kernel_version.h
kernel.h kernel: improve k_thread_user_mode_enter() docs 2020-10-26 13:06:16 +01:00
mempool_heap.h sys_heap: reduce the size of struct z_heap_bucket by half 2020-06-21 19:25:35 +02:00
mempool_sys.h
ptp_clock.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
sched_priq.h
shared_irq.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
spinlock.h kernel: Add cache coherence management framework 2020-10-21 06:38:53 -04:00
sw_isr_table.h irq: Change dynamic API to take a constant parameter 2020-09-02 13:48:13 +02:00
sys_clock.h kernel/sys_clock.h: Remove deprecated macros 2020-10-04 14:12:27 -07:00
syscall_handler.h device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
syscall.h
timeout_q.h kernel: timer: update _timeout API for const correctness 2020-10-02 11:29:14 +02:00
toolchain.h ARC: toolchain: handle difference in macros for MWDT and ARC GNU 2020-09-05 10:22:56 -05:00
wait_q.h
zephyr.h