You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2023/01/18 03:01:30 UTC

[nuttx] 02/03: Add shm_open and shm_unlink to syscalls

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit b09581f73667f22c801d77e08ef8360e1d12020f
Author: Jukka Laitinen <ju...@ssrc.tii.ae>
AuthorDate: Tue Apr 5 11:42:08 2022 +0400

    Add shm_open and shm_unlink to syscalls
    
    Signed-off-by: Jukka Laitinen <ju...@ssrc.tii.ae>
---
 include/sys/syscall_lookup.h | 5 +++++
 syscall/syscall.csv          | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/include/sys/syscall_lookup.h b/include/sys/syscall_lookup.h
index 160936be07..9ad6ef3d03 100644
--- a/include/sys/syscall_lookup.h
+++ b/include/sys/syscall_lookup.h
@@ -287,6 +287,11 @@ SYSCALL_LOOKUP(munmap,                     2)
   SYSCALL_LOOKUP(shmdt,                    1)
 #endif
 
+#ifdef CONFIG_FS_SHMFS
+  SYSCALL_LOOKUP(shm_open,                 3)
+  SYSCALL_LOOKUP(shm_unlink,               1)
+#endif
+
 /* The following are defined if pthreads are enabled */
 
 #ifndef CONFIG_DISABLE_PTHREAD
diff --git a/syscall/syscall.csv b/syscall/syscall.csv
index 4df02fe6f9..66a982c18f 100644
--- a/syscall/syscall.csv
+++ b/syscall/syscall.csv
@@ -147,6 +147,8 @@
 "setitimer","sys/time.h","!defined(CONFIG_DISABLE_POSIX_TIMERS)","int","int","FAR const struct itimerval *","FAR struct itimerval *"
 "setsockopt","sys/socket.h","defined(CONFIG_NET)","int","int","int","int","FAR const void *","socklen_t"
 "setuid","unistd.h","defined(CONFIG_SCHED_USER_IDENTITY)","int","uid_t"
+"shm_open","sys/mman.h","defined(CONFIG_FS_SHMFS)","int","FAR const char *","int","mode_t"
+"shm_unlink","sys/mman.h","defined(CONFIG_FS_SHMFS)","int","FAR const char *"
 "shmat","sys/shm.h","defined(CONFIG_MM_SHM)","FAR void *","int","FAR const void *","int"
 "shmctl","sys/shm.h","defined(CONFIG_MM_SHM)","int","int","int","FAR struct shmid_ds *"
 "shmdt","sys/shm.h","defined(CONFIG_MM_SHM)","int","FAR const void *"