From a9c374ed2667ed9ecd971189c561023391c2c369 Mon Sep 17 00:00:00 2001 From: manu Date: Thu, 21 Feb 2002 22:15:28 +0000 Subject: [PATCH] Added munmap() and mprotect() --- sys/compat/irix/irix_syscall.h | 10 ++++++++-- sys/compat/irix/irix_syscallargs.h | 6 ++++-- sys/compat/irix/irix_syscalls.c | 10 +++++----- sys/compat/irix/irix_sysent.c | 14 +++++++------- sys/compat/irix/syscalls.master | 6 +++--- 5 files changed, 27 insertions(+), 19 deletions(-) diff --git a/sys/compat/irix/irix_syscall.h b/sys/compat/irix/irix_syscall.h index 91896a5d626e..699e89c861fc 100644 --- a/sys/compat/irix/irix_syscall.h +++ b/sys/compat/irix/irix_syscall.h @@ -1,10 +1,10 @@ -/* $NetBSD: irix_syscall.h,v 1.24 2002/02/21 11:09:43 manu Exp $ */ +/* $NetBSD: irix_syscall.h,v 1.25 2002/02/21 22:15:28 manu Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.22 2002/02/17 22:49:55 manu Exp + * created from NetBSD: syscalls.master,v 1.23 2002/02/21 11:09:43 manu Exp */ /* syscall: "syscall" ret: "int" args: */ @@ -280,6 +280,12 @@ /* syscall: "mmap" ret: "void *" args: "void *" "svr4_size_t" "int" "int" "int" "svr4_off_t" */ #define IRIX_SYS_mmap 134 +/* syscall: "munmap" ret: "int" args: "void *" "int" */ +#define IRIX_SYS_munmap 135 + +/* syscall: "mprotect" ret: "int" args: "void *" "int" "int" */ +#define IRIX_SYS_mprotect 136 + /* syscall: "systeminfo" ret: "long" args: "int" "char *" "long" */ #define IRIX_SYS_systeminfo 156 diff --git a/sys/compat/irix/irix_syscallargs.h b/sys/compat/irix/irix_syscallargs.h index b73be2842d1e..53627ec98912 100644 --- a/sys/compat/irix/irix_syscallargs.h +++ b/sys/compat/irix/irix_syscallargs.h @@ -1,10 +1,10 @@ -/* $NetBSD: irix_syscallargs.h,v 1.24 2002/02/21 11:09:43 manu Exp $ */ +/* $NetBSD: irix_syscallargs.h,v 1.25 2002/02/21 22:15:28 manu Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.22 2002/02/17 22:49:55 manu Exp + * created from NetBSD: syscalls.master,v 1.23 2002/02/21 11:09:43 manu Exp */ #ifndef _IRIX_SYS__SYSCALLARGS_H_ @@ -238,6 +238,8 @@ int sys_adjtime(struct proc *, void *, register_t *); int svr4_sys_gettimeofday(struct proc *, void *, register_t *); int irix_sys_prctl(struct proc *, void *, register_t *); int svr4_sys_mmap(struct proc *, void *, register_t *); +int sys_munmap(struct proc *, void *, register_t *); +int sys_mprotect(struct proc *, void *, register_t *); int irix_sys_systeminfo(struct proc *, void *, register_t *); int irix_sys_xstat(struct proc *, void *, register_t *); int irix_sys_lxstat(struct proc *, void *, register_t *); diff --git a/sys/compat/irix/irix_syscalls.c b/sys/compat/irix/irix_syscalls.c index 10d4fb2f0f6b..620ddb87da75 100644 --- a/sys/compat/irix/irix_syscalls.c +++ b/sys/compat/irix/irix_syscalls.c @@ -1,14 +1,14 @@ -/* $NetBSD: irix_syscalls.c,v 1.24 2002/02/21 11:09:43 manu Exp $ */ +/* $NetBSD: irix_syscalls.c,v 1.25 2002/02/21 22:15:28 manu Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.22 2002/02/17 22:49:55 manu Exp + * created from NetBSD: syscalls.master,v 1.23 2002/02/21 11:09:43 manu Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: irix_syscalls.c,v 1.24 2002/02/21 11:09:43 manu Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irix_syscalls.c,v 1.25 2002/02/21 22:15:28 manu Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -181,8 +181,8 @@ const char *const irix_syscallnames[] = { "#132 (unimplemented sprocsp)", /* 132 = unimplemented sprocsp */ "#133 (unimplemented sgigsc)", /* 133 = unimplemented sgigsc */ "mmap", /* 134 = mmap */ - "#135 (unimplemented munmap)", /* 135 = unimplemented munmap */ - "#136 (unimplemented mprotect)", /* 136 = unimplemented mprotect */ + "munmap", /* 135 = munmap */ + "mprotect", /* 136 = mprotect */ "#137 (unimplemented msync)", /* 137 = unimplemented msync */ "#138 (unimplemented madvise)", /* 138 = unimplemented madvise */ "#139 (unimplemented pagelock)", /* 139 = unimplemented pagelock */ diff --git a/sys/compat/irix/irix_sysent.c b/sys/compat/irix/irix_sysent.c index f209d9d812ee..9d76e7cb3fce 100644 --- a/sys/compat/irix/irix_sysent.c +++ b/sys/compat/irix/irix_sysent.c @@ -1,14 +1,14 @@ -/* $NetBSD: irix_sysent.c,v 1.24 2002/02/21 11:09:43 manu Exp $ */ +/* $NetBSD: irix_sysent.c,v 1.25 2002/02/21 22:15:29 manu Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.22 2002/02/17 22:49:55 manu Exp + * created from NetBSD: syscalls.master,v 1.23 2002/02/21 11:09:43 manu Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: irix_sysent.c,v 1.24 2002/02/21 11:09:43 manu Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irix_sysent.c,v 1.25 2002/02/21 22:15:29 manu Exp $"); #if defined(_KERNEL_OPT) #include "opt_ntp.h" @@ -319,10 +319,10 @@ struct sysent irix_sysent[] = { sys_nosys }, /* 133 = unimplemented sgigsc */ { 6, s(struct svr4_sys_mmap_args), 0, svr4_sys_mmap }, /* 134 = mmap */ - { 0, 0, 0, - sys_nosys }, /* 135 = unimplemented munmap */ - { 0, 0, 0, - sys_nosys }, /* 136 = unimplemented mprotect */ + { 2, s(struct sys_munmap_args), 0, + sys_munmap }, /* 135 = munmap */ + { 3, s(struct sys_mprotect_args), 0, + sys_mprotect }, /* 136 = mprotect */ { 0, 0, 0, sys_nosys }, /* 137 = unimplemented msync */ { 0, 0, 0, diff --git a/sys/compat/irix/syscalls.master b/sys/compat/irix/syscalls.master index 877b4fcb6da2..0848a3de280d 100644 --- a/sys/compat/irix/syscalls.master +++ b/sys/compat/irix/syscalls.master @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.23 2002/02/21 11:09:43 manu Exp $ + $NetBSD: syscalls.master,v 1.24 2002/02/21 22:15:29 manu Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -250,8 +250,8 @@ 133 UNIMPL sgigsc 134 NOARGS { void *svr4_sys_mmap(void *addr, svr4_size_t len, \ int prot, int flags, int fd, svr4_off_t pos); } -135 UNIMPL munmap -136 UNIMPL mprotect +135 NOARGS { int sys_munmap(void *addr, int len); } +136 NOARGS { int sys_mprotect(void *addr, int len, int prot); } 137 UNIMPL msync 138 UNIMPL madvise 139 UNIMPL pagelock