zephyr/scripts
Wentong Wu 5611e92347 kernel: add futex support
A k_futex is a lightweight mutual exclusion primitive designed
to minimize kernel involvement. Uncontended operation relies
only on atomic access to shared memory. k_futex structure lives
in application memory. And when using futexes, the majority of
the synchronization operations are performed in user mode. A
user-mode thread employs the futex wait system call only when
it is likely that the program has to block for a longer time
until the condition becomes true. When the condition comes true,
futex wake operation will be used to wake up one or more threads
waiting on that futex.

This patch implements two futex operations: k_futex_wait and
k_futex_wake. For k_futex_wait, the comparison with the expected
value, and starting to sleep are performed atomically to prevent
lost wake-ups. If different context changed futex's value after
the calling use-mode thread decided to block himself based on
the old value, the comparison will help observing the value
change and will not start to sleep. And for k_futex_wake, it
will wake at most num_waiters of the waiters that are sleeping
on that futex. But no guarantees are made on which threads are
woken, that means scheduling priority is not taken into
consideration.

Fixes: #14493.

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-06-24 15:38:21 -07:00
..
checkpatch
ci ci: increase sleep time between sanitycheck runs 2019-06-20 22:15:27 +02:00
coccinelle
dts scripts/dts: Treat array always as a list 2019-06-24 07:16:59 -04:00
footprint
gitlint
kconfig genrest: De-spam docs by skipping direct deps. in more places 2019-06-24 12:14:06 -07:00
sanity_chk sanitycheck harness: Correct ordered regex handling 2019-06-19 14:37:20 -04:00
support
west_commands scripts: runners: check for required programs 2019-06-17 15:06:21 +02:00
.gitignore
check_link_map.py
checkpatch.pl dts: import vendor-prefixes.txt from linux kernel 2019-05-22 12:40:20 -04:00
checkstack.pl
coccicheck docs: fix misspelling across the tree 2019-06-19 15:34:13 -05:00
dir_is_writeable.py
elf_helper.py kernel: add futex support 2019-06-24 15:38:21 -07:00
file2hex.py
filter-known-issues.py docs: fix misspelling across the tree 2019-06-19 15:34:13 -05:00
gen_app_partitions.py
gen_cfb_font_header.py generated/cfb_font_dice.h: don't leak absolute paths in comment 2019-06-19 08:40:59 -04:00
gen_gcov_files.py
gen_kobject_list.py kernel: add futex support 2019-06-24 15:38:21 -07:00
gen_offset_header.py
gen_priv_stacks.py scripts: gen_priv_stacks.py: use the right alignment for priv stacks 2019-06-24 10:16:57 -07:00
gen_relocate_app.py docs: fix misspelling across the tree 2019-06-19 15:34:13 -05:00
gen_syscall_header.py
gen_syscalls.py
mergehex.py scripts: mergehex: Add --overlap argument 2019-05-16 07:16:55 -05:00
parse_syscalls.py
process_gperf.py
qemu-machine-hack.py
requirements.txt scripts: Upgrade pyocd for pack support 2019-06-18 23:03:35 -04:00
sanitycheck sanitycheck: show handler_time in -v output (qemu 2.032s) 2019-06-21 13:47:32 -04:00
series-push-hook.sh
spelling.txt
subfolder_list.py
tags.sh
valgrind.supp
waitpid
west-commands.yml west: Add completion command 2019-05-10 13:08:27 +02:00
zephyr_module.py cmake: zephyr_modules: Add west executable argument 2019-05-03 14:23:09 -04:00