This is an automated email from the ASF dual-hosted git repository. acassis pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 4f8049216241b0547dfb669c64064b2fe20b9538 Author: Marco Casaroli <[email protected]> AuthorDate: Tue Oct 27 09:44:43 2026 +0100 syscall: Add the System V message queue calls. msgget(), msgctl(), msgsnd() and msgrcv() are in the kernel (sched/mqueue) but were not system calls: in a protected or a kernel build a program that uses them did not link (undefined references), so System V message queues were only for kernel code. Add them to syscall.csv and syscall_lookup.h, with the condition of their code (CONFIG_DISABLE_MQUEUE_SYSV not set). Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- include/sys/syscall_lookup.h | 9 +++++++++ syscall/syscall.csv | 4 ++++ 2 files changed, 13 insertions(+) diff --git a/include/sys/syscall_lookup.h b/include/sys/syscall_lookup.h index 20cf700e0ae..b5552cfa734 100644 --- a/include/sys/syscall_lookup.h +++ b/include/sys/syscall_lookup.h @@ -375,6 +375,15 @@ SYSCALL_LOOKUP(munlockall, 0) SYSCALL_LOOKUP(mq_unlink, 1) #endif +/* The following are defined only if System V message queues are enabled */ + +#ifndef CONFIG_DISABLE_MQUEUE_SYSV + SYSCALL_LOOKUP(msgctl, 3) + SYSCALL_LOOKUP(msgget, 2) + SYSCALL_LOOKUP(msgrcv, 5) + SYSCALL_LOOKUP(msgsnd, 4) +#endif + /* The following are defined only if networking AND sockets are supported */ #ifdef CONFIG_NET diff --git a/syscall/syscall.csv b/syscall/syscall.csv index d04474d5e30..af9a9c0481b 100644 --- a/syscall/syscall.csv +++ b/syscall/syscall.csv @@ -85,6 +85,10 @@ "mq_timedreceive","mqueue.h","!defined(CONFIG_DISABLE_MQUEUE)","ssize_t","mqd_t","FAR char *","size_t","FAR unsigned int *","FAR const struct timespec *" "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 *" +"msgctl","sys/msg.h","!defined(CONFIG_DISABLE_MQUEUE_SYSV)","int","int","int","FAR struct msqid_ds *" +"msgget","sys/msg.h","!defined(CONFIG_DISABLE_MQUEUE_SYSV)","int","key_t","int" +"msgrcv","sys/msg.h","!defined(CONFIG_DISABLE_MQUEUE_SYSV)","ssize_t","int","FAR void *","size_t","long","int" +"msgsnd","sys/msg.h","!defined(CONFIG_DISABLE_MQUEUE_SYSV)","int","int","FAR const void *","size_t","int" "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"
