zephyr/kernel
Andrew Boie 818a96d3af userspace: assign thread IDs at build time
Kernel object metadata had an extra data field added recently to
store bounds for stack objects. Use this data field to assign
IDs to thread objects at build time. This has numerous advantages:

* Threads can be granted permissions on kernel objects before the
  thread is initialized. Previously, it was necessary to call
  k_thread_create() with a K_FOREVER delay, assign permissions, then
  start the thread. Permissions are still completely cleared when
  a thread exits.

* No need for runtime logic to manage thread IDs

* Build error if CONFIG_MAX_THREAD_BYTES is set too low

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-11-03 11:29:23 -07:00
..
include userspace: assign thread IDs at build time 2017-11-03 11:29:23 -07:00
Kconfig kernel: Add option to ensure writable pages are not executable 2017-11-02 13:40:50 -07:00
Kconfig.event_logger kernel: Add thread events to kernel event logger 2017-04-25 02:16:36 +00:00
Kconfig.power_mgmt doc: spelling fixes in Kconfig files 2017-06-12 19:40:51 -04:00
Makefile kernel: add syscalls for k_object_access APIs 2017-10-05 12:53:41 -04: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: Compare pointers before strings when getting device binding 2017-10-19 14:43:48 -07:00
errno.c kernel: errno: Use per-thread accessor function compatible with Newlib 2017-05-10 20:54:56 -04:00
idle.c linker: move all linker headers to include/linker 2017-06-18 09:24:04 -05:00
init.c userspace: assign thread IDs at build time 2017-11-03 11:29:23 -07: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: Use SYS_DLIST_FOR_EACH_CONTAINER whenever possible 2017-08-25 09:08:50 -04:00
mem_domain.c kernel: Add option to ensure writable pages are not executable 2017-11-02 13:40:50 -07:00
mem_slab.c kernel: introduce object validation mechanism 2017-09-07 16:33:33 -07:00
mempool.c mem_pool: Don't check level_empty() before breaking a block 2017-07-31 09:14:59 -07:00
msg_q.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
mutex.c kernel: Remove dead or commented code from k_mutex_lock() 2017-10-24 11:11:00 -07:00
pipes.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
poll.c poll: k_poll: Return -EINTR if not ready 2017-10-18 13:02:52 -04:00
pthread.c kernel: POSIX thread IPC support 2017-08-15 19:42:07 -04:00
queue.c queue: k_queue_cancel_wait: Fix not interrupting other threads 2017-10-18 13:02:52 -04:00
sched.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
sem.c kernel: Fix comment section of semaphore object 2017-10-27 10:56:58 -07:00
stack.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
sys_clock.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
system_work_q.c kernel: introduce stack definition macros 2017-06-09 18:53:28 -04:00
thread.c userspace: assign thread IDs at build time 2017-11-03 11:29:23 -07:00
thread_abort.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
timer.c kernel: Provide only one _SYSCALL_HANDLER() macro 2017-10-16 13:42:15 -04:00
userspace.c userspace: assign thread IDs at build time 2017-11-03 11:29:23 -07: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 kernel: fix k_thread_stack_t definition 2017-10-17 08:24:29 -07:00