kernel: add K_INHERIT_PERMS flag

By default, threads are created only having access to their own thread
object and nothing else. This new flag to k_thread_create() gives the
thread access to all objects that the parent had at the time it was
created, with the exception of the parent thread itself.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-10-05 11:11:02 -07:00 committed by Andrew Boie
commit 47f8fd1d4d
6 changed files with 75 additions and 2 deletions

View file

@ -471,6 +471,12 @@ extern void k_call_stacks_analyze(void);
*/
#define K_USER (1 << 2)
/* Indicates that the thread being created should inherit all kernel object
* permissions from the thread that created it. No effect if CONFIG_USERSPACE
* is not enabled.
*/
#define K_INHERIT_PERMS (1 << 3)
#ifdef CONFIG_X86
/* x86 Bitmask definitions for threads user options */