zephyr/lib/os
Guennadi Liakhovetski 56610bdafb p4wq: fix races when handling work items
Work items in P4WQ currently belong to the user before submission
and after exit from the handler, therefore, unless the handler
re-submits the item, accessing it in p4wq_loop() in such cases
is racy. To fix this we re-define work item ownership. Now the
item belongs to the P4WQ core until the user calls
k_p4wq_wait(). If the work item has its .sync flag set, the
function will sleep until the handler completes processing the
work item or until the timeout expires. If .sync isn't set and
the handler hasn't processed the item yet, the function returns
-EBUSY.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2021-05-03 17:13:01 -04:00
..
assert.c userspace: rename _is_user_context -> k_is_user_context 2021-04-01 05:34:17 -04:00
base64.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
cbprintf.c lib: cbprintf: add libc f/printf substitutes 2021-01-27 13:34:06 -05:00
cbprintf_complete.c lib: os: cbprintf_complete: fix typo in cbvprintf width comment 2021-04-29 07:14:39 -04:00
cbprintf_nano.c lib: os: add final else where missing in cbprintf_* 2021-04-28 20:28:19 -04:00
cbprintf_packaged.c lib/os: cbprintf_packaged: simplify rodata check 2021-04-28 22:25:42 +02:00
CMakeLists.txt power: move reboot functionality to os lib 2021-04-28 20:34:00 -04:00
crc7_sw.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
crc8_sw.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
crc16_sw.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
crc32_sw.c lib: crc32_sw: 4 bit at a time implementation 2021-01-24 14:24:48 -05:00
crc32c_sw.c lib: os: Introduce support for CRC32C algorithm 2021-03-02 14:08:30 +01:00
dec.c zephyr: replace zephyr integer types with C99 types 2020-06-08 08:23:57 -05:00
fdtable.c net: socket: Add locking to prevent concurrent access 2021-04-15 07:16:51 -05:00
heap-validate.c lib: os: add final else where missing in heap* 2021-04-28 20:28:19 -04:00
heap.c lib: os: add final else where missing in heap* 2021-04-28 20:28:19 -04:00
heap.h lib/os/heap: straighten up our type usage 2021-03-18 19:33:39 -04:00
hex.c lib: hex: Remove constant expression 2020-09-02 13:45:50 -04:00
json.c misc: Replace assert include and calls by sys/__assert.h equivalent 2020-10-02 11:42:40 +02:00
Kconfig power: move reboot functionality to os lib 2021-04-28 20:34:00 -04:00
Kconfig.cbprintf lib: os: cbprintf: Add static packaging 2021-03-11 09:54:39 +01:00
mpsc_pbuf.c tests: lib: Add test for mpsc_pbuf 2021-04-19 10:59:23 -04:00
mutex.c lib: os: Simplify z_impl_z_sys_mutex_kernel_unlock 2021-03-10 05:42:06 -05:00
notify.c lib: os: assign sys_notify callback default to NULL... 2021-04-29 07:16:37 -04:00
onoff.c lib: os: add final else where missing in onoff, p4wq, sem 2021-04-28 20:28:19 -04:00
p4wq.c p4wq: fix races when handling work items 2021-05-03 17:13:01 -04:00
printk.c logging: Adapt logger to support both versions 2021-04-19 10:59:23 -04:00
rb.c lib: rb: Fix violations to rule 12.1 2021-04-20 15:50:49 -04:00
reboot.c lib: os: reboot: misc cleanup 2021-04-28 20:34:00 -04:00
ring_buffer.c sys: ring_buffer: allow NULL data buffers 2021-04-09 13:19:30 +02:00
sem.c lib: os: add final else where missing in onoff, p4wq, sem 2021-04-28 20:28:19 -04:00
thread_entry.c lib: os: remove dead code 2019-06-18 09:08:01 -04:00
timeutil.c lib/timeutil: add utilities to manage local/reference clock alignment 2021-01-20 16:38:56 -05:00
user_work.c kernel: provide functional equivalent to old userspace work queue API 2021-03-03 20:06:00 -05:00
work_q.c os: work_q: Use NULL instead of 0 2020-09-02 13:45:50 -04:00