sched/semaphore: Move cancel point and errno handling to libc / user-space

This moves all the public POSIX semaphore functions into libc and with
this most of the user-space logic is also moved; namely cancel point and
errno handling.

This also removes the need for the _SEM_XX macros used to differentiate
which API is used per user-/kernel mode. Such macros are henceforth
unnecessary.
This commit is contained in:
Ville Juven
2023-11-16 16:27:06 +02:00
committed by Xiang Xiao
parent 34afef5cfb
commit c9bdadd541
20 changed files with 552 additions and 411 deletions
+6 -8
View File
@@ -75,17 +75,15 @@ SYSCALL_LOOKUP(sethostname, 2)
/* Semaphores */
SYSCALL_LOOKUP(nxsem_destroy, 1)
SYSCALL_LOOKUP(nxsem_post, 1)
SYSCALL_LOOKUP(nxsem_clockwait, 3)
SYSCALL_LOOKUP(nxsem_timedwait, 2)
SYSCALL_LOOKUP(nxsem_trywait, 1)
SYSCALL_LOOKUP(nxsem_wait, 1)
SYSCALL_LOOKUP(sem_destroy, 1)
SYSCALL_LOOKUP(sem_post, 1)
SYSCALL_LOOKUP(sem_clockwait, 3)
SYSCALL_LOOKUP(sem_timedwait, 2)
SYSCALL_LOOKUP(sem_trywait, 1)
SYSCALL_LOOKUP(sem_wait, 1)
#ifdef CONFIG_PRIORITY_INHERITANCE
SYSCALL_LOOKUP(sem_setprotocol, 2)
SYSCALL_LOOKUP(nxsem_set_protocol, 2)
#endif
/* Named semaphores */