zephyr/subsys/portability
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
..
cmsis_rtos_v1 subsys/cmsis_v*: Fix racy mutex testing, decouple from k_mutex 2022-10-17 10:13:56 +02:00
cmsis_rtos_v2 subsys/cmsis_v*: Fix racy mutex testing, decouple from k_mutex 2022-10-17 10:13:56 +02:00
CMakeLists.txt portability: move cmsis APIs to subsys/portability 2021-04-20 08:45:05 -04:00
Kconfig portability: move cmsis APIs to subsys/portability 2021-04-20 08:45:05 -04:00