Skip to content

Commit

Permalink
Regen for close_range
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardobranco777 committed Feb 16, 2025
1 parent 3b629a3 commit 9c2c2ee
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 19 deletions.
9 changes: 5 additions & 4 deletions sys/kern/init_sysent.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: init_sysent.c,v 1.346 2024/10/09 16:29:10 christos Exp $ */
/* $NetBSD$ */

/*
* System call switch table.
Expand All @@ -8,7 +8,7 @@
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: init_sysent.c,v 1.346 2024/10/09 16:29:10 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD$");

#ifdef _KERNEL_OPT
#include "opt_modular.h"
Expand Down Expand Up @@ -2483,8 +2483,9 @@ struct sysent sysent[] = {
.sy_call = (sy_call_t *)sys_nomodule
}, /* 506 = semtimedop */
{
.sy_call = sys_nosys,
}, /* 507 = filler */
ns(struct sys_close_range_args),
.sy_call = (sy_call_t *)sys_close_range
}, /* 507 = close_range */
{
.sy_call = sys_nosys,
}, /* 508 = filler */
Expand Down
8 changes: 4 additions & 4 deletions sys/kern/syscalls.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: syscalls.c,v 1.334 2024/10/09 16:29:11 christos Exp $ */
/* $NetBSD$ */

/*
* System call names.
Expand All @@ -8,7 +8,7 @@
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: syscalls.c,v 1.334 2024/10/09 16:29:11 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD$");

#if defined(_KERNEL_OPT)
#ifdef _KERNEL_OPT
Expand Down Expand Up @@ -557,7 +557,7 @@ const char *const syscallnames[] = {
/* 504 */ "epoll_pwait2",
/* 505 */ "__dup3100",
/* 506 */ "semtimedop",
/* 507 */ "# filler",
/* 507 */ "close_range",
/* 508 */ "# filler",
/* 509 */ "# filler",
/* 510 */ "# filler",
Expand Down Expand Up @@ -1094,7 +1094,7 @@ const char *const altsyscallnames[] = {
/* 504 */ NULL, /* epoll_pwait2 */
/* 505 */ "dup3",
/* 506 */ NULL, /* semtimedop */
/* 507 */ NULL, /* filler */
/* 507 */ NULL, /* close_range */
/* 508 */ NULL, /* filler */
/* 509 */ NULL, /* filler */
/* 510 */ NULL, /* filler */
Expand Down
4 changes: 2 additions & 2 deletions sys/kern/syscalls_autoload.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: syscalls_autoload.c,v 1.50 2024/10/09 16:29:11 christos Exp $ */
/* $NetBSD$ */

/*
* System call autoload table.
Expand All @@ -8,7 +8,7 @@
*/

#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: syscalls_autoload.c,v 1.50 2024/10/09 16:29:11 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD$");

#ifdef _KERNEL_OPT
#include "opt_modular.h"
Expand Down
32 changes: 31 additions & 1 deletion sys/kern/systrace_args.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: systrace_args.c,v 1.56 2024/10/09 16:29:11 christos Exp $ */
/* $NetBSD$ */

/*
* System call argument to DTrace register array conversion.
Expand Down Expand Up @@ -3954,6 +3954,15 @@ systrace_args(register_t sysnum, const void *params, uintptr_t *uarg, size_t *n_
*n_args = 4;
break;
}
/* sys_close_range */
case 507: {
const struct sys_close_range_args *p = params;
uarg[0] = SCARG(p, first); /* u_int */
uarg[1] = SCARG(p, last); /* u_int */
iarg[2] = SCARG(p, flags); /* int */
*n_args = 3;
break;
}
default:
*n_args = 0;
break;
Expand Down Expand Up @@ -10683,6 +10692,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
/* sys_close_range */
case 507:
switch(ndx) {
case 0:
p = "u_int";
break;
case 1:
p = "u_int";
break;
case 2:
p = "int";
break;
default:
break;
};
break;
default:
break;
};
Expand Down Expand Up @@ -12920,6 +12945,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
/* sys_close_range */
case 507:
if (ndx == 0 || ndx == 1)
p = "int";
break;
default:
break;
};
Expand Down
2 changes: 1 addition & 1 deletion sys/rump/include/rump/rump_syscalls.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: rump_syscalls.h,v 1.133 2024/10/09 16:29:11 christos Exp $ */
/* $NetBSD$ */

/*
* System call protos in rump namespace.
Expand Down
7 changes: 3 additions & 4 deletions sys/rump/librump/rumpkern/rump_syscalls.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: rump_syscalls.c,v 1.164 2024/10/09 16:29:11 christos Exp $ */
/* $NetBSD$ */

/*
* System call vector and marshalling for rump.
Expand All @@ -15,7 +15,7 @@

#ifdef __NetBSD__
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.164 2024/10/09 16:29:11 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD$");

#include <sys/fstypes.h>
#include <sys/proc.h>
Expand Down Expand Up @@ -8664,9 +8664,8 @@ struct sysent rump_sysent[] = {
.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
}, /* 506 = semtimedop */
{
.sy_flags = SYCALL_NOSYS,
.sy_call = (sy_call_t *)(void *)rumpns_enosys,
}, /* 507 = filler */
}, /* 507 = close_range */
{
.sy_flags = SYCALL_NOSYS,
.sy_call = (sy_call_t *)(void *)rumpns_enosys,
Expand Down
7 changes: 5 additions & 2 deletions sys/sys/syscall.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: syscall.h,v 1.329 2024/10/09 16:29:11 christos Exp $ */
/* $NetBSD$ */

/*
* System call numbers.
Expand Down Expand Up @@ -1425,6 +1425,9 @@
/* syscall: "semtimedop" ret: "int" args: "int" "struct sembuf *" "size_t" "struct timespec *" */
#define SYS_semtimedop 506

#define SYS_MAXSYSCALL 507
/* syscall: "close_range" ret: "int" args: "u_int" "u_int" "int" */
#define SYS_close_range 507

#define SYS_MAXSYSCALL 508
#define SYS_NSYSENT 512
#endif /* _SYS_SYSCALL_H_ */
13 changes: 12 additions & 1 deletion sys/sys/syscallargs.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $NetBSD: syscallargs.h,v 1.312 2024/10/09 16:29:11 christos Exp $ */
/* $NetBSD$ */

/*
* System call argument lists.
Expand Down Expand Up @@ -3419,6 +3419,15 @@ struct sys_semtimedop_args {
check_syscall_args(sys_semtimedop)
#endif /* !RUMP_CLIENT */

#ifndef RUMP_CLIENT
struct sys_close_range_args {
syscallarg(u_int) first;
syscallarg(u_int) last;
syscallarg(int) flags;
};
check_syscall_args(sys_close_range)
#endif /* !RUMP_CLIENT */

/*
* System call prototypes.
*/
Expand Down Expand Up @@ -4357,5 +4366,7 @@ int sys___dup3100(struct lwp *, const struct sys___dup3100_args *, register_t *)

int sys_semtimedop(struct lwp *, const struct sys_semtimedop_args *, register_t *);

int sys_close_range(struct lwp *, const struct sys_close_range_args *, register_t *);

#endif /* !RUMP_CLIENT */
#endif /* _SYS_SYSCALLARGS_H_ */

0 comments on commit 9c2c2ee

Please sign in to comment.