zephyr/lib/os
Kai Vehmanen 4b49d7cb23 lib: os: p4wq: fix K_P4WQ_DELAYED_START mode
When the PRESTART thread state was removed, this changed the semantics
of k_thread_start() when thread was created with a K_FOREVER timeout,
suspended and then started with k_thread_start().

This sequence is used in p4wq to implement K_P4WQ_DELAYED_START
(which again is needed by K_P4WQ_USER_CPU_MASK).

With PRESTART removed, the following sequence:
  z_mark_thread_as_not_suspended(thread);
  k_thread_start(thread);

.. no longer starts the thread. As a result, p4wq users like SOF
multicore configurations, hit errors as p4wq threads never start.

Fix the implementation by removing the calls to change thread
suspended state explicitly, but rather rely on the new
k_thread_create() and k_thread_start() semantics.

Fixes: 7cdf40541b ("kernel/sched: Eliminate PRESTART thread state")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-12-04 22:26:38 -05:00
..
zvfs net: Deprecate CONFIG_NET_SOCKETS_POLL_MAX 2024-10-14 13:01:51 +02:00
assert.c llext: export some symbols 2023-12-01 10:08:12 -05:00
cbprintf.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
cbprintf_complete.c ARCMWDT: Fix cbprintf issue with omitted function prototype 2024-06-28 07:21:11 -04:00
cbprintf_nano.c ARCMWDT: Fix cbprintf issue with omitted function prototype 2024-06-28 07:21:11 -04:00
cbprintf_packaged.c lib: os: cbprintf_packaged: Fix cbprintf_package_convert 2024-11-01 09:56:03 -05:00
CMakeLists.txt net: sockets: move poll implementation to zvfs 2024-10-14 13:01:51 +02:00
fdtable.c net: sockets: Cleanup socket properly if POSIX API is enabled 2024-11-08 15:56:39 -06:00
Kconfig lib: os: spsc_pbuf: Clarify using cache management in the module 2024-07-01 16:07:30 -04:00
Kconfig.cbprintf libc/picolibc: Support 'long long' and 'minimal' printf variants 2023-11-20 06:07:58 -05:00
mpsc_pbuf.c logging: fix log buffer pending while it is definitely full 2024-08-23 08:04:18 -04:00
mutex.c coding guidelines: comply with MISRA Rule 12.1. 2024-06-13 20:28:23 -04:00
p4wq.c lib: os: p4wq: fix K_P4WQ_DELAYED_START mode 2024-12-04 22:26:38 -05:00
poweroff.c lib: os: add support for system power off 2023-08-04 16:59:36 +02:00
printk.c lib: os: change __printk_get_hook return type to printk_hook_fn_t 2024-07-27 10:41:01 +03:00
reboot.c lib: os: reboot: dump coverage info on sys_reboot 2024-06-15 04:39:53 -04:00
sem.c coding guidelines: comply with MISRA Rule 12.1. 2024-06-13 20:28:23 -04:00
spsc_pbuf.c spsc_pbuf: fix cache invalidation in spsc_pbuf_free 2024-02-01 13:10:28 -06:00
thread_entry.c arch: kernel: lib: toolchain: Standardize TLS keyword 2024-09-23 10:01:48 +02:00
user_work.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00