nuttx-update/sched/semaphore
zhangyuan29 eae46b0823 sem: change sem wait to atomic operation
Add sem_wait fast operations, use atomic to ensure
atomicity of semcount operations, and do not depend
on critical section.

Test with robot:
before modify:
nxmutex_lock cost: 78 ns
nxmutex_unlock cost: 82 ns

after modify:
nxmutex_lock cost: 28 ns
nxmutex_unlock cost: 14 ns

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-17 15:40:48 +08:00
..
CMakeLists.txt cmake:refine nuttx cmake build system fix CMake build missing part 2024-10-13 02:25:06 +08:00
Make.defs sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_clockwait.c sem: use wd_start_realtime/abstime to replace wd_start 2024-10-09 13:54:29 +08:00
sem_destroy.c sem: change sem wait to atomic operation 2024-12-17 15:40:48 +08:00
sem_holder.c sem: change sem wait to atomic operation 2024-12-17 15:40:48 +08:00
sem_initialize.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_post.c sem: change sem wait to atomic operation 2024-12-17 15:40:48 +08:00
sem_protect.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_recover.c sem: change sem wait to atomic operation 2024-12-17 15:40:48 +08:00
sem_reset.c sem: change sem wait to atomic operation 2024-12-17 15:40:48 +08:00
sem_rw.c Revert "shced:sem: replace mutex with spinlock" 2024-10-29 23:01:39 +08:00
sem_setprotocol.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_tickwait.c sched/semaphore/sem_tickwait.c: Fix nxsem_tickwait_uninterruptible end condition 2024-09-30 19:23:01 +08:00
sem_timedwait.c sched: migrate to SPDX identifier 2024-09-12 01:10:14 +08:00
sem_timeout.c sched: change xx_timeout param from pid to tcb 2024-09-29 18:18:01 +08:00
sem_trywait.c sem: change sem wait to atomic operation 2024-12-17 15:40:48 +08:00
sem_wait.c sem: change sem wait to atomic operation 2024-12-17 15:40:48 +08:00
sem_waitirq.c sem: change sem wait to atomic operation 2024-12-17 15:40:48 +08:00
semaphore.h sem: change sem wait to atomic operation 2024-12-17 15:40:48 +08:00