Re: [PATCH RESEND v2 1/4]IPC: Added New system call do_mq_timedreceive2() for non-destructive peek on posix mqueue
From: Jonathan Corbet
Date: Mon Mar 30 2026 - 16:02:29 EST
Mathura_Kumar <academic1mathura@xxxxxxxxx> writes:
> +SYSCALL_DEFINE5(mq_timedreceive2, mqd_t, mqdes,
> + struct mq_timedreceive2_args __user *, uargs, unsigned int,
> + flags, const unsigned long, index,
> + const struct __kernel_timespec __user *, u_abs_timeout)
So the pattern that seems to have emerged when creating this kind of
argument structure for system calls is to pass the size of the structure
itself as an argument. That allows the structure to be expanded in
compatible ways in the future, so you won't have to do
mq_timedreceive3(). Is there a reason you didn't do it that way here?
Thanks,
jon