zephyr/include
Andy Ross 193f4feb84 lib: Red/Black balanced tree data structure
A balanced tree implementation for Zephyr as we grow into bigger
regimes where simpler data structures aren't appropriate.

This implements an intrusive balanced tree that guarantees O(log2(N))
runtime for all operations and amortized O(1) behavior for creation
and destruction of whole trees.  The algorithms and naming are
conventional per existing academic and didactic implementations, c.f.:

https://en.wikipedia.org/wiki/Red%E2%80%93black_tree

The implementation is size-optimized to prioritize runtime memory
usage.  The data structure is intrusive, which is to say the struct
rbnode handle is intended to be placed in a separate struct the same
way other such structures (e.g. Zephyr's dlist list) and requires no
data pointer to be stored in the node.  The color bit is unioned with
a pointer (fairly common for such libraries).  Most notably, there is
no "parent" pointer stored in the node, the upper structure of the
tree being generated dynamically via a stack as the tree is recursed.
So the overall memory overhead of a node is just two pointers,
identical with a doubly-linked list.

Code size above dlist is about 2-2.5k on most architectures, which is
significant by Zephyr standards but probably still worthwhile in many
situations.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2018-04-10 12:31:51 -04:00
..
arch mpu: arm: restrict access to PPB/IO regions 2018-04-02 19:54:08 -07:00
bluetooth Bluetooth: Remove 'own_addr' from advertising parameters 2018-03-21 18:11:49 +02:00
crypto
debug debug: remove DEBUG_INFO option 2018-02-12 13:58:28 -08:00
dfu subsys: dfu: boot: Remove unused ver query code. 2018-02-21 18:53:42 -05:00
display doc: APIs: group display drivers 2017-11-17 17:14:18 -05:00
drivers drivers/spi: Switch Intel driver to new SPI API 2018-04-04 19:02:35 +02:00
dt-bindings drivers: clock_control: Provide support for stm32l0x 2018-03-10 11:42:25 -06:00
fs subsys: fs: Add Virtual File system Switch (VFS) support 2018-03-10 21:38:04 -05:00
linker net: Add initial TX and RX traffic class support 2018-03-27 10:06:54 -04:00
logging subsys: kernel_event_logger: change kernel event values 2018-02-23 07:29:29 -05:00
mgmt mgmt: Bluetooth transport for SMP (mcumgr). 2018-02-20 22:07:52 +01:00
misc lib: Red/Black balanced tree data structure 2018-04-10 12:31:51 -04:00
net net/ethernet: Add a management interface 2018-04-10 14:45:37 +03:00
posix lib: posix: Move posix layer from 'kernel' to 'lib' 2018-04-05 16:43:05 -04:00
random subsys: Add random subsystem 2017-11-01 08:26:29 -04:00
settings doc: subsystem: settings subsystem doc 2018-04-06 12:46:39 +02:00
shell subsys: mgmt: Shell transport for SMP (mcumgr). 2018-02-20 22:07:52 +01:00
toolchain include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
usb include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
zephyr
adc.h drivers: adc: add system call handlers 2017-10-30 13:20:19 -07:00
aio_comparator.h drivers: aio_comparator: add system calls 2017-10-30 13:20:19 -07:00
atomic.h
base64.h lib: base64: Add statement of changes 2018-03-23 13:54:48 +01:00
cache.h
clock_control.h
console.h doc: fix misspellings in include (API docs) 2017-08-10 12:22:19 -04:00
counter.h doc: add missing API content 2017-12-01 08:58:56 -05:00
crc8.h crc: make crc8_ccitt() match the other CRC functions. 2018-03-10 21:49:07 -05:00
crc16.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
device.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
disk_access.h disk: delete the GET_DISK_SIZE IOCTL. 2018-01-31 09:14:40 -05:00
dma.h dma: Fix building when system calls are disabled 2018-02-13 10:32:41 -05:00
entropy.h drivers: Rename random to entropy 2017-11-01 08:26:29 -04:00
eth.h
fcb.h subsys: fs: fcb: remove f_area_id from fcb structure 2018-02-07 09:51:26 -05:00
flash_map.h subsys: storage: flash_map: Fix warning 2018-02-14 14:36:52 -05:00
flash.h flash: minor documentation improvements. 2017-11-28 12:25:19 -05:00
fs.h doc: misspellings in public API doxygen comments 2018-04-05 19:16:24 -04:00
gpio.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
i2c.h drivers: i2c: add system call handlers 2017-10-30 13:20:19 -07:00
i2s.h doc: do not show undocumented members 2018-03-20 14:01:30 -04:00
init.h init.h: Fix english in comment 2018-03-26 13:17:39 -04:00
ipm.h drivers: ipm: add system calls 2017-10-30 13:20:19 -07:00
irq_offload.h
irq.h kernel: Make irq_{un}lock() APIs into a global spinlock in SMP mode 2018-02-16 10:44:29 -05:00
json.h doc: json: add to doxygen group 2017-11-22 13:27:01 -05:00
kernel_version.h kernel: version: parenthesize macro value 2018-01-04 13:29:03 -05:00
kernel.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
led_strip.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
pinmux.h pinmux: add two more entries to the function enum. 2018-02-05 06:31:35 -08:00
power.h
pwm.h drivers: pwm: add system call handlers 2017-10-30 13:20:19 -07:00
ring_buffer.h ring_buffer: remove broken object_tracing support 2018-01-18 17:44:38 -05:00
rtc.h drivers: rtc: add system calls 2017-10-30 13:20:19 -07:00
sensor.h sensors: Add separation between ambient and die temperature 2018-04-03 22:29:11 -04:00
shared_irq.h
spi.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
spinlock.h kernel: Simple spinlock API 2018-02-16 10:44:29 -05:00
stats.h doc: misspellings in public API doxygen comments 2018-04-05 19:16:24 -04:00
sw_isr_table.h sw_isr_table.h: fix includes 2017-10-27 16:08:54 -04:00
sys_clock.h
sys_io.h sys_io.h: don't pull in kernel.h 2017-11-02 13:25:01 -07:00
syscall.h kernel: allow system call with 64-bit return val 2017-10-12 16:25:00 -07:00
toolchain.h xtensa: move byte-order macros out of arch.h 2017-05-11 12:47:23 -04:00
uart.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
watchdog.h include: improve compatibility with C++ apps. 2018-04-09 23:21:52 -04:00
zephyr.h