Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/irix On IRIX, the first 88 system calls are quite...



details:   https://anonhg.NetBSD.org/src/rev/04b5f6b15282
branches:  trunk
changeset: 518332:04b5f6b15282
user:      manu <manu%NetBSD.org@localhost>
date:      Wed Nov 28 12:00:53 2001 +0000

description:
On IRIX, the first 88 system calls are quite plain SVR4, and the 137
remaining are IRIX specific. We know use SVR4 emulation for the first 88
system calls.

diffstat:

 sys/compat/irix/files.irix         |   23 +-
 sys/compat/irix/irix_exec.c        |   25 +-
 sys/compat/irix/irix_syscall.h     |  156 ++++++++++-
 sys/compat/irix/irix_syscallargs.h |  198 +++++++++++++-
 sys/compat/irix/irix_syscalls.c    |  362 ++++++++++++++++--------
 sys/compat/irix/irix_sysent.c      |  537 +++++++++++++++++++++++++-----------
 sys/compat/irix/irix_syssgi.c      |   70 ++++
 sys/compat/irix/irix_syssgi.h      |  302 ++++++++++++++++++++
 sys/compat/irix/irix_types.h       |   18 +-
 sys/compat/irix/syscalls.conf      |    4 +-
 sys/compat/irix/syscalls.master    |  385 +++++++++++++++++--------
 11 files changed, 1634 insertions(+), 446 deletions(-)

diffs (truncated from 2380 to 300 lines):

diff -r 439b2a209cfe -r 04b5f6b15282 sys/compat/irix/files.irix
--- a/sys/compat/irix/files.irix        Wed Nov 28 11:58:22 2001 +0000
+++ b/sys/compat/irix/files.irix        Wed Nov 28 12:00:53 2001 +0000
@@ -1,5 +1,26 @@
-#      $NetBSD: files.irix,v 1.2 2001/11/26 21:36:24 manu Exp $
+#      $NetBSD: files.irix,v 1.3 2001/11/28 12:00:53 manu Exp $
 #
 
+file   arch/mips/mips/irix_syscall.c           compat_irix
+
 file   compat/irix/irix_exec.c                 compat_irix
 file   compat/irix/irix_exec_elf32.c           compat_irix & exec_elf32
+file   compat/irix/irix_sysent.c               compat_irix
+file   compat/irix/irix_syssgi.c               compat_irix
+
+file   arch/mips/mips/svr4_machdep.c           compat_irix
+
+file   compat/svr4/svr4_fcntl.c                compat_irix
+file   compat/svr4/svr4_misc.c                 compat_irix
+file   compat/svr4/svr4_stat.c                 compat_irix
+file   compat/svr4/svr4_signal.c               compat_irix
+file   compat/svr4/svr4_ipc.c                  compat_irix
+file   compat/svr4/svr4_ioctl.c                compat_irix
+file   compat/svr4/svr4_stream.c               compat_irix
+file   compat/svr4/svr4_socket.c               compat_irix
+file   compat/svr4/svr4_termios.c              compat_irix
+file   compat/svr4/svr4_ttold.c                compat_irix
+file   compat/svr4/svr4_filio.c                compat_irix
+file   compat/svr4/svr4_sockio.c               compat_irix
+file   compat/svr4/svr4_net.c                  compat_irix
+
diff -r 439b2a209cfe -r 04b5f6b15282 sys/compat/irix/irix_exec.c
--- a/sys/compat/irix/irix_exec.c       Wed Nov 28 11:58:22 2001 +0000
+++ b/sys/compat/irix/irix_exec.c       Wed Nov 28 12:00:53 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: irix_exec.c,v 1.3 2001/11/26 21:36:24 manu Exp $ */
+/*     $NetBSD: irix_exec.c,v 1.4 2001/11/28 12:00:53 manu Exp $ */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: irix_exec.c,v 1.3 2001/11/26 21:36:24 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irix_exec.c,v 1.4 2001/11/28 12:00:53 manu Exp $");
 
 #ifndef ELFSIZE
 #define ELFSIZE                32      /* XXX should die */
@@ -50,10 +50,9 @@
 #include <sys/exec_elf.h>
 #include <sys/malloc.h>
 
-#include <sys/syscall.h>
-
 #include <compat/common/compat_util.h>
 
+#include <compat/irix/irix_syscall.h>
 #include <compat/irix/irix_types.h>
 #include <compat/irix/irix_exec.h>
 
@@ -61,12 +60,12 @@
     struct exec_package *epp, Elf_Ehdr *eh));
 
 extern char sigcode[], esigcode[];
-extern struct sysent sysent[];
+extern struct sysent irix_sysent[];
 
 #ifndef __HAVE_SYSCALL_INTERN
-void syscall __P((void));
+void irix_syscall __P((void));
 #else
-void syscall_intern __P((struct proc *));
+void irix_syscall_intern __P((struct proc *));
 #endif
 
 const struct emul emul_irix = {
@@ -75,12 +74,12 @@
 #ifndef __HAVE_MINIMAL_EMUL
        0,
        0,
-       SYS_syscall,
-       SYS_MAXSYSCALL,
+       IRIX_SYS_syscall,
+       IRIX_SYS_MAXSYSCALL,
 #endif
-       sysent,
+       irix_sysent,
 #ifdef SYSCALL_DEBUG
-       syscallnames,
+       irix_syscallnames,
 #else
        NULL,
 #endif
@@ -93,9 +92,9 @@
        NULL,
        NULL,
 #ifdef __HAVE_SYSCALL_INTERN
-       syscall_intern,
+       irix_syscall_intern,
 #else
-       syscall,
+       irix_syscall,
 #endif
 };
 
diff -r 439b2a209cfe -r 04b5f6b15282 sys/compat/irix/irix_syscall.h
--- a/sys/compat/irix/irix_syscall.h    Wed Nov 28 11:58:22 2001 +0000
+++ b/sys/compat/irix/irix_syscall.h    Wed Nov 28 12:00:53 2001 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: irix_syscall.h,v 1.3 2001/11/26 21:36:25 manu Exp $ */
+/* $NetBSD: irix_syscall.h,v 1.4 2001/11/28 12:00:53 manu Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from        NetBSD: syscalls.master,v 1.1 2001/09/22 18:51:36 manu Exp 
+ * created from        NetBSD: syscalls.master,v 1.2 2001/11/26 21:36:25 manu Exp 
  */
 
 /* syscall: "syscall" ret: "int" args: */
@@ -22,5 +22,153 @@
 /* syscall: "write" ret: "int" args: "int" "char *" "u_int" */
 #define        IRIX_SYS_write  4
 
-#define        IRIX_SYS_MAXSYSCALL     128
-#define        IRIX_SYS_NSYSENT        128
+/* syscall: "open" ret: "int" args: "const char *" "int" "int" */
+#define        IRIX_SYS_open   5
+
+/* syscall: "close" ret: "int" args: "int" */
+#define        IRIX_SYS_close  6
+
+                               /* 7 is obsolete wait */
+/* syscall: "creat" ret: "int" args: "const char *" "int" */
+#define        IRIX_SYS_creat  8
+
+/* syscall: "link" ret: "int" args: "char *" "char *" */
+#define        IRIX_SYS_link   9
+
+/* syscall: "unlink" ret: "int" args: "char *" */
+#define        IRIX_SYS_unlink 10
+
+/* syscall: "execv" ret: "int" args: "const char *" "char **" */
+#define        IRIX_SYS_execv  11
+
+/* syscall: "chdir" ret: "int" args: "char *" */
+#define        IRIX_SYS_chdir  12
+
+/* syscall: "time" ret: "int" args: "svr4_time_t *" */
+#define        IRIX_SYS_time   13
+
+                               /* 14 is obsolete mknod */
+/* syscall: "chmod" ret: "int" args: "char *" "int" */
+#define        IRIX_SYS_chmod  15
+
+/* syscall: "chown" ret: "int" args: "char *" "int" "int" */
+#define        IRIX_SYS_chown  16
+
+/* syscall: "break" ret: "int" args: "caddr_t" */
+#define        IRIX_SYS_break  17
+
+                               /* 18 is obsolete stat */
+/* syscall: "lseek" ret: "long" args: "int" "long" "int" */
+#define        IRIX_SYS_lseek  19
+
+/* syscall: "getpid" ret: "pid_t" args: */
+#define        IRIX_SYS_getpid 20
+
+/* syscall: "setuid" ret: "int" args: "uid_t" */
+#define        IRIX_SYS_setuid 23
+
+/* syscall: "getuid_with_euid" ret: "uid_t" args: */
+#define        IRIX_SYS_getuid_with_euid       24
+
+                               /* 27 is obsolete alarm */
+/* syscall: "fstat" ret: "int" args: "int" "struct svr4_stat *" */
+#define        IRIX_SYS_fstat  28
+
+/* syscall: "pause" ret: "int" args: */
+#define        IRIX_SYS_pause  29
+
+/* syscall: "utime" ret: "int" args: "const char *" "struct svr4_utimbuf *" */
+#define        IRIX_SYS_utime  30
+
+/* syscall: "access" ret: "int" args: "const char *" "int" */
+#define        IRIX_SYS_access 33
+
+/* syscall: "nice" ret: "int" args: "int" */
+#define        IRIX_SYS_nice   34
+
+/* syscall: "sync" ret: "int" args: */
+#define        IRIX_SYS_sync   36
+
+/* syscall: "kill" ret: "int" args: "int" "int" */
+#define        IRIX_SYS_kill   37
+
+/* syscall: "pgrpsys" ret: "int" args: "int" "int" "int" */
+#define        IRIX_SYS_pgrpsys        39
+
+/* syscall: "syssgi" ret: "ptrdiff_t" args: "int" "void *" "void *" "void *" "void *" "void *" */
+#define        IRIX_SYS_syssgi 40
+
+/* syscall: "dup" ret: "int" args: "u_int" */
+#define        IRIX_SYS_dup    41
+
+/* syscall: "pipe" ret: "int" args: */
+#define        IRIX_SYS_pipe   42
+
+/* syscall: "times" ret: "int" args: "struct tms *" */
+#define        IRIX_SYS_times  43
+
+/* syscall: "setgid" ret: "int" args: "gid_t" */
+#define        IRIX_SYS_setgid 46
+
+/* syscall: "getgid_with_egid" ret: "gid_t" args: */
+#define        IRIX_SYS_getgid_with_egid       47
+
+                               /* 48 is obsolete ssig */
+/* syscall: "msgsys" ret: "int" args: "int" "int" "int" "int" "int" */
+#define        IRIX_SYS_msgsys 49
+
+/* syscall: "shmsys" ret: "int" args: "int" "int" "int" "int" */
+#define        IRIX_SYS_shmsys 52
+
+/* syscall: "semsys" ret: "int" args: "int" "int" "int" "int" "int" */
+#define        IRIX_SYS_semsys 53
+
+/* syscall: "ioctl" ret: "int" args: "int" "u_long" "caddr_t" */
+#define        IRIX_SYS_ioctl  54
+
+/* syscall: "utssys" ret: "int" args: "void *" "void *" "int" "void *" */
+#define        IRIX_SYS_utssys 57
+
+/* syscall: "execve" ret: "int" args: "const char *" "char **" "char **" */
+#define        IRIX_SYS_execve 59
+
+/* syscall: "umask" ret: "int" args: "int" */
+#define        IRIX_SYS_umask  60
+
+/* syscall: "chroot" ret: "int" args: "char *" */
+#define        IRIX_SYS_chroot 61
+
+/* syscall: "fcntl" ret: "int" args: "int" "int" "char *" */
+#define        IRIX_SYS_fcntl  62
+
+/* syscall: "ulimit" ret: "long" args: "int" "long" */
+#define        IRIX_SYS_ulimit 63
+
+                               /* 70 is obsolete advfs */
+                               /* 71 is obsolete unadvfs */
+                               /* 72 is obsolete rmount */
+                               /* 73 is obsolete rumount */
+                               /* 74 is obsolete rfstart */
+                               /* 75 is obsolete sigret */
+                               /* 76 is obsolete rdebug */
+                               /* 77 is obsolete rfstop */
+/* syscall: "rmdir" ret: "int" args: "char *" */
+#define        IRIX_SYS_rmdir  79
+
+/* syscall: "mkdir" ret: "int" args: "char *" "int" */
+#define        IRIX_SYS_mkdir  80
+
+/* syscall: "getdents" ret: "int" args: "int" "char *" "int" */
+#define        IRIX_SYS_getdents       81
+
+/* syscall: "getmsg" ret: "int" args: "int" "struct svr4_strbuf *" "struct svr4_strbuf *" "int *" */
+#define        IRIX_SYS_getmsg 85
+
+/* syscall: "putmsg" ret: "int" args: "int" "struct svr4_strbuf *" "struct svr4_strbuf *" "int" */
+#define        IRIX_SYS_putmsg 86
+
+/* syscall: "poll" ret: "int" args: "struct pollfd *" "u_int" "int" */
+#define        IRIX_SYS_poll   87
+
+#define        IRIX_SYS_MAXSYSCALL     226
+#define        IRIX_SYS_NSYSENT        226
diff -r 439b2a209cfe -r 04b5f6b15282 sys/compat/irix/irix_syscallargs.h
--- a/sys/compat/irix/irix_syscallargs.h        Wed Nov 28 11:58:22 2001 +0000
+++ b/sys/compat/irix/irix_syscallargs.h        Wed Nov 28 12:00:53 2001 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: irix_syscallargs.h,v 1.3 2001/11/26 21:36:25 manu Exp $ */
+/* $NetBSD: irix_syscallargs.h,v 1.4 2001/11/28 12:00:53 manu Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from        NetBSD: syscalls.master,v 1.1 2001/09/22 18:51:36 manu Exp 
+ * created from        NetBSD: syscalls.master,v 1.2 2001/11/26 21:36:25 manu Exp 
  */
 
 #ifndef _IRIX_SYS__SYSCALLARGS_H_
@@ -27,6 +27,146 @@
                } be;                                                   \
        }
 
+struct svr4_sys_open_args {
+       syscallarg(const char *) path;



Home | Main Index | Thread Index | Old Index