userspace: add thread-level permission tracking

Now creating a thread will assign it a unique, monotonically increasing
id which is used to reference the permission bitfield in the kernel
object metadata.

Stub functions in userspace.c now implemented.

_new_thread is now wrapped in a common function with pre- and post-
architecture thread initialization tasks.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-08-30 14:31:03 -07:00 committed by Andrew Boie
commit 2acfcd6b05
5 changed files with 67 additions and 23 deletions

View file

@ -310,6 +310,11 @@ struct _thread_base {
/* this thread's entry in a timeout queue */
struct _timeout timeout;
#endif
#ifdef CONFIG_USERSPACE
/* Bit position in kernel object permissions bitfield for this thread */
unsigned int perm_index;
#endif
};
typedef struct _thread_base _thread_base_t;