This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new bf905d242ef syscall: add missing memory locking and clock_getres
entries
bf905d242ef is described below
commit bf905d242ef9230aba3ed1910b1fcaa7700bd493
Author: raiden00pl <[email protected]>
AuthorDate: Fri Aug 7 10:27:52 2026 +0200
syscall: add missing memory locking and clock_getres entries
add missing syscall entries for mlock, mlockall, munlock, munlockall,
mprotect and clock_getres
Signed-off-by: raiden00pl <[email protected]>
Assisted-by: Claude Code
---
include/sys/syscall_lookup.h | 6 ++++++
syscall/syscall.csv | 6 ++++++
2 files changed, 12 insertions(+)
diff --git a/include/sys/syscall_lookup.h b/include/sys/syscall_lookup.h
index 97b1cee5b05..595cded1ce2 100644
--- a/include/sys/syscall_lookup.h
+++ b/include/sys/syscall_lookup.h
@@ -176,6 +176,7 @@ SYSCALL_LOOKUP(clock_nanosleep, 4)
*/
SYSCALL_LOOKUP(clock, 0)
+SYSCALL_LOOKUP(clock_getres, 2)
SYSCALL_LOOKUP(clock_gettime, 2)
SYSCALL_LOOKUP(clock_settime, 2)
#ifdef CONFIG_CLOCK_ADJTIME
@@ -250,6 +251,9 @@ SYSCALL_LOOKUP(dup2, 2)
SYSCALL_LOOKUP(fcntl, 3)
SYSCALL_LOOKUP(ftruncate, 2)
SYSCALL_LOOKUP(lseek, 3)
+SYSCALL_LOOKUP(mlock, 2)
+SYSCALL_LOOKUP(mlockall, 1)
+SYSCALL_LOOKUP(mprotect, 3)
SYSCALL_LOOKUP(mmap, 6)
SYSCALL_LOOKUP(open, 3)
SYSCALL_LOOKUP(rename, 2)
@@ -272,6 +276,8 @@ SYSCALL_LOOKUP(lutimens, 2)
SYSCALL_LOOKUP(futimens, 2)
SYSCALL_LOOKUP(msync, 3)
SYSCALL_LOOKUP(munmap, 2)
+SYSCALL_LOOKUP(munlock, 2)
+SYSCALL_LOOKUP(munlockall, 0)
#if defined(CONFIG_PSEUDOFS_SOFTLINKS)
SYSCALL_LOOKUP(link, 2)
diff --git a/syscall/syscall.csv b/syscall/syscall.csv
index 582deb3907f..4b7a69f9fc4 100644
--- a/syscall/syscall.csv
+++ b/syscall/syscall.csv
@@ -13,6 +13,7 @@
"clearenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int"
"clock","time.h","","clock_t"
"clock_adjtime","sys/timex.h","defined(CONFIG_CLOCK_ADJTIME)","int","clockid_t","struct
timex *"
+"clock_getres","time.h","","int","clockid_t","FAR struct timespec *"
"clock_gettime","time.h","","int","clockid_t","FAR struct timespec *"
"clock_nanosleep","time.h","","int","clockid_t","int","FAR const struct
timespec *", "FAR struct timespec *"
"clock_settime","time.h","","int","clockid_t","const struct timespec*"
@@ -67,7 +68,10 @@
"lstat","sys/stat.h","","int","FAR const char *","FAR struct stat *"
"lutimens","sys/stat.h","","int","FAR const char *","const struct timespec
[2]|FAR const struct timespec *"
"mkdir","sys/stat.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const
char *","mode_t"
+"mlock","sys/mman.h","","int","FAR const void *","size_t"
+"mlockall","sys/mman.h","","int","int"
"mmap","sys/mman.h","","FAR void *","FAR void
*","size_t","int","int","int","off_t"
+"mprotect","sys/mman.h","","int","FAR void *","size_t","int"
"modhandle","nuttx/module.h","defined(CONFIG_MODULE)","FAR void *","FAR const
char *"
"mount","sys/mount.h","!defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const
char *","FAR const char *","FAR const char *","unsigned long","FAR const void *"
"mq_close","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t"
@@ -81,6 +85,8 @@
"mq_timedsend","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","mqd_t","FAR
const char *","size_t","unsigned int","FAR const struct timespec *"
"mq_unlink","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","int","FAR const char
*"
"msync","sys/mman.h","","int","FAR void *","size_t","int"
+"munlock","sys/mman.h","","int","FAR const void *","size_t"
+"munlockall","sys/mman.h","","int"
"munmap","sys/mman.h","","int","FAR void *","size_t"
"nanosleep","time.h","","int","FAR const struct timespec *","FAR struct
timespec *"
"nx_mkfifo","nuttx/fs/fs.h","defined(CONFIG_PIPES) && CONFIG_DEV_FIFO_SIZE >
0","int","FAR const char *","mode_t","size_t"