Skip to content

Commit

Permalink
nuttx/syscall: export nxsem_getprioceiling and nxsem_setprioceiling v…
Browse files Browse the repository at this point in the history
…ia syscall

Signed-off-by: makejian <makejian@xiaomi.com>
  • Loading branch information
makejian committed Oct 11, 2024
1 parent 933e066 commit 34da015
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/sys/syscall_lookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libs/libc/semaphore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
2 changes: 2 additions & 0 deletions syscall/syscall.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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 *"
Expand Down

0 comments on commit 34da015

Please sign in to comment.