nuttx-update/libs/libc/semaphore
zhangyuan29 b74a50775f 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-10 22:00:42 +08:00
..
CMakeLists.txt nuttx/syscall: export nxsem_getprioceiling and nxsem_setprioceiling via syscall 2024-10-12 09:50:54 +08:00
Make.defs libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_clockwait.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_close.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_destroy.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_getprioceiling.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_getprotocol.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_getvalue.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_init.c sem: change sem wait to atomic operation 2024-12-10 22:00:42 +08:00
sem_open.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_post.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_setprioceiling.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_setprotocol.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_timedwait.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_trywait.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_unlink.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00
sem_wait.c libs/libc: migrate to SPDX identifier 2024-10-01 12:25:52 +08:00