From e8a890ef4253fa12f7579ed9594b30af9402b2fc Mon Sep 17 00:00:00 2001 From: makejian Date: Tue, 8 Oct 2024 20:42:35 +0800 Subject: [PATCH] nuttx/syscall: export nxsem_getprioceiling and nxsem_setprioceiling via syscall Signed-off-by: makejian --- include/sys/syscall_lookup.h | 5 +++++ libs/libc/semaphore/CMakeLists.txt | 2 +- syscall/syscall.csv | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/sys/syscall_lookup.h b/include/sys/syscall_lookup.h index 8bdca9d370..18438e195f 100644 --- a/include/sys/syscall_lookup.h +++ b/include/sys/syscall_lookup.h @@ -88,6 +88,11 @@ SYSCALL_LOOKUP(nxsem_wait, 1) SYSCALL_LOOKUP(nxsem_set_protocol, 2) #endif +#ifdef CONFIG_PRIORITY_PROTECT + SYSCALL_LOOKUP(nxsem_setprioceiling, 3) + SYSCALL_LOOKUP(nxsem_getprioceiling, 2) +#endif + /* Named semaphores */ #ifdef CONFIG_FS_NAMED_SEMAPHORES diff --git a/libs/libc/semaphore/CMakeLists.txt b/libs/libc/semaphore/CMakeLists.txt index 970eac72a3..f544ca82d0 100644 --- a/libs/libc/semaphore/CMakeLists.txt +++ b/libs/libc/semaphore/CMakeLists.txt @@ -37,7 +37,7 @@ if(CONFIG_FS_NAMED_SEMAPHORES) endif() if(CONFIG_PRIORITY_PROTECT) - list(APPEND CSRCS sem_getprioceiling.c sem_setprioceiling.c) + list(APPEND SRCS sem_getprioceiling.c sem_setprioceiling.c) endif() target_sources(c PRIVATE ${SRCS}) diff --git a/syscall/syscall.csv b/syscall/syscall.csv index 9c307835b3..c3e81430b2 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -88,9 +88,11 @@ "nxsem_clockwait","nuttx/semaphore.h","","int","FAR sem_t *","clockid_t","FAR const struct timespec *" "nxsem_close","nuttx/semaphore.h","defined(CONFIG_FS_NAMED_SEMAPHORES)","int","FAR sem_t *" "nxsem_destroy","nuttx/semaphore.h","","int","FAR sem_t *" +"nxsem_getprioceiling","nuttx/semaphore.h","defined(CONFIG_PRIORITY_PROTECT)","int","FAR const sem_t *","FAR int *" "nxsem_open","nuttx/semaphore.h","defined(CONFIG_FS_NAMED_SEMAPHORES)","int","FAR sem_t **","FAR const char *","int","...","mode_t","unsigned int" "nxsem_post","nuttx/semaphore.h","","int","FAR sem_t *" "nxsem_set_protocol","nuttx/semaphore.h","defined(CONFIG_PRIORITY_INHERITANCE)","int","FAR sem_t *","int" +"nxsem_setprioceiling","nuttx/semaphore.h","defined(CONFIG_PRIORITY_PROTECT)","int","FAR sem_t *","int","FAR int *" "nxsem_timedwait","nuttx/semaphore.h","","int","FAR sem_t *","FAR const struct timespec *" "nxsem_trywait","nuttx/semaphore.h","","int","FAR sem_t *" "nxsem_unlink","nuttx/semaphore.h","defined(CONFIG_FS_NAMED_SEMAPHORES)","int","FAR const char *"