zephyr/subsys/portability/cmsis_rtos_v1
Andy Ross 45ea83af89 subsys/cmsis_v*: Fix racy mutex testing, decouple from k_mutex
The cmsis implementations of osMutex was trying to inspect internal
k_mutex state (the owner and lock count) in the process of trying to
acquire the lock.  This is unfixably racy, by definition other
contexts will be trying to do the same on the unsynchronized data.

As far as I can tell, the only purpose was to be able to synthesize
osMutex's specified error behavior, which we can do with the existing
return codes from k_mutex_lock().  Add similar logic to osSemaphore,
which didn't have the race but was likewise abusing access to kernel
internals.

Signed-off-by: Andy Ross <andyross@google.com>
2022-10-17 10:13:56 +02:00
..
CMakeLists.txt include: Prefix includes to use a scope 2022-04-08 19:03:32 +02:00
cmsis_kernel.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
cmsis_mailq.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
cmsis_mempool.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
cmsis_msgq.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
cmsis_mutex.c subsys/cmsis_v*: Fix racy mutex testing, decouple from k_mutex 2022-10-17 10:13:56 +02:00
cmsis_semaphore.c subsys/cmsis_v*: Fix racy mutex testing, decouple from k_mutex 2022-10-17 10:13:56 +02:00
cmsis_signal.c sys_clock: define NSEC_PER_MSEC 2022-09-01 16:29:25 -04:00
cmsis_thread.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
cmsis_timer.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
cmsis_wait.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
Kconfig cmsis_rtos_v1: fix thread instances management. 2021-09-09 12:01:06 -04:00