zephyr/kernel
Andrew Boie aa6de29c4b lib: user mode compatible mempools
We would like to offer the capability to have memory pool heap data
structures that are usable from user mode threads. The current
k_mem_pool implementation uses IRQ locking and system-wide membership
lists that make it incompatible with user mode constraints.

However, much of the existing memory pool code can be abstracted to some
common functions that are used by both k_mem_pool and the new
sys_mem_pool implementations.

The sys_mem_pool implementation has the following differences:

* The alloc/free APIs work directly with pointers, no internal memory
block structures are exposed to the end user. A pointer to the source
pool is provided for allocation, but freeing memory just requires the
pointer and nothing else.

* k_mem_pool uses IRQ locks and required very fine-grained locking in
order to not affect system latency. sys_mem_pools just use a semaphore
to protect the pool data structures at the API level, since there aren't
implications for system responsiveness with this kind of concurrency
control.

* sys_mem_pools do not support the notion of timeouts for requesting
memory.

* sys_mem_pools are specified at compile time with macros, just like
kernel memory pools. Alternative forms of specification at runtime
will be a later enhancement.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2018-04-05 07:03:05 -07:00
..
include kernel: Fix left shift into sign bit 2018-03-22 19:16:17 -04:00
posix kernel: posix: move sleep and usleep functions into c file. 2018-04-05 08:15:55 -04:00
CMakeLists.txt kernel: POSIX: Compatibility layer for pthread APIs. 2018-02-21 19:17:28 -05:00
Kconfig kernel: POSIX: Compatibility layer for POSIX message queue APIs. 2018-04-03 15:30:44 -04:00
Kconfig.event_logger kconfig: fix more help spacing issues 2018-02-15 23:20:55 -05:00
Kconfig.power_mgmt kconfig: fix more help spacing issues 2018-02-15 23:20:55 -05:00
alert.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
atomic_c.c license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
compiler_stack_protect.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
device.c kernel: device: Only compare strings if pointer comparison fails 2018-02-15 17:31:59 -08:00
errno.c kernel: errno: Use per-thread accessor function compatible with Newlib 2017-05-10 20:54:56 -04:00
idle.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
init.c kernel: Cleanup, unify _add_thread_to_ready_q() and _ready_thread() 2018-03-18 16:58:12 -04:00
int_latency_bench.c Convert remaining code to using newly introduced integer sized types 2017-04-21 11:38:23 -05:00
mailbox.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
mem_domain.c kernel: mem_domain: Fix compile issues 2018-03-05 10:47:00 -06:00
mem_slab.c kernel: Add kswap.h header to unbreak cycles 2018-02-16 10:44:29 -05:00
mempool.c lib: user mode compatible mempools 2018-04-05 07:03:05 -07:00
msg_q.c kernel: msg_q: Add routine to fetch basic attrs from message queue. 2018-04-03 15:30:44 -04:00
mutex.c kernel: Add kswap.h header to unbreak cycles 2018-02-16 10:44:29 -05:00
pipes.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
poll.c kernel: Cleanup, unify _add_thread_to_ready_q() and _ready_thread() 2018-03-18 16:58:12 -04:00
queue.c kernel/queue: Clean up scheduler API usage 2018-03-18 16:58:12 -04:00
sched.c kernel/sched: Clean up docs for _pend_thread(), limit scope 2018-03-18 16:58:12 -04:00
sem.c kernel: Remove unnecessary old code 2018-03-05 14:10:50 -08:00
smp.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
stack.c kernel: Add kswap.h header to unbreak cycles 2018-02-16 10:44:29 -05:00
sys_clock.c kernel: SMP timer integration 2018-02-16 10:44:29 -05:00
system_work_q.c kernel: introduce stack definition macros 2017-06-09 18:53:28 -04:00
thread.c kernel: thread: Consider stack pointer fuzz underflow 2018-04-03 12:32:56 -07:00
thread_abort.c kernel: Allow k_thread_abort(_current) from ISRs 2018-02-16 10:44:29 -05:00
timer.c kernel: Add kswap.h header to unbreak cycles 2018-02-16 10:44:29 -05:00
userspace.c kernel: Name of static functions should not begin with an underscore 2018-03-10 08:39:10 -05:00
userspace_handler.c userspace: assign thread IDs at build time 2017-11-03 11:29:23 -07:00
version.c kernel: version: no need to store version in RAM 2017-09-07 16:34:50 -07:00
work_q.c work_q: Correctly clear pending flag in delayed work queue, update docs 2018-02-13 18:08:57 -05:00