lib: os: add sys_sem data type

For systems with userspace, the sys_sem exist in user memory working
as counter semaphore for user mode thread. The implemention of sys_sem
is based on k_futex. And the majority of the synchronization operations
are performed in user mode to reduce the calling of system call.
And for systems without userspace enabled, sys_sem behaves like k_sem.

Fixes: #15139.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
This commit is contained in:
Wentong Wu 2019-07-24 16:04:55 +08:00 committed by Andrew Boie
commit 715369350d
3 changed files with 244 additions and 0 deletions

View file

@ -11,6 +11,7 @@ zephyr_sources(
hex.c
mempool.c
rb.c
sem.c
thread_entry.c
timeutil.c
work_q.c