Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/compat/irix Added a void framework for usync_cntl(), whi...
details: https://anonhg.NetBSD.org/src/rev/d1ba553e7a4a
branches: trunk
changeset: 526264:d1ba553e7a4a
user: manu <manu%NetBSD.org@localhost>
date: Mon Apr 29 14:40:23 2002 +0000
description:
Added a void framework for usync_cntl(), which is another undocumented IRIX
system call.
diffstat:
sys/compat/irix/files.irix | 3 +-
sys/compat/irix/irix_syscall.h | 7 ++-
sys/compat/irix/irix_syscallargs.h | 10 ++++-
sys/compat/irix/irix_syscalls.c | 8 ++--
sys/compat/irix/irix_sysent.c | 10 ++--
sys/compat/irix/irix_usync.c | 74 ++++++++++++++++++++++++++++++++++++++
sys/compat/irix/irix_usync.h | 53 +++++++++++++++++++++++++++
sys/compat/irix/syscalls.master | 4 +-
8 files changed, 153 insertions(+), 16 deletions(-)
diffs (291 lines):
diff -r e12b1ed3b5bf -r d1ba553e7a4a sys/compat/irix/files.irix
--- a/sys/compat/irix/files.irix Mon Apr 29 13:42:42 2002 +0000
+++ b/sys/compat/irix/files.irix Mon Apr 29 14:40:23 2002 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.irix,v 1.21 2002/04/23 05:51:14 manu Exp $
+# $NetBSD: files.irix,v 1.22 2002/04/29 14:40:23 manu Exp $
#
file arch/mips/mips/irix_syscall.c compat_irix
@@ -23,6 +23,7 @@
file compat/irix/irix_sysmp.c compat_irix
file compat/irix/irix_systeminfo.c compat_irix
file compat/irix/irix_usema.c compat_irix
+file compat/irix/irix_usync.c compat_irix
file arch/mips/mips/svr4_machdep.c compat_irix
diff -r e12b1ed3b5bf -r d1ba553e7a4a sys/compat/irix/irix_syscall.h
--- a/sys/compat/irix/irix_syscall.h Mon Apr 29 13:42:42 2002 +0000
+++ b/sys/compat/irix/irix_syscall.h Mon Apr 29 14:40:23 2002 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: irix_syscall.h,v 1.41 2002/04/28 20:23:21 manu Exp $ */
+/* $NetBSD: irix_syscall.h,v 1.42 2002/04/29 14:40:23 manu Exp $ */
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from NetBSD: syscalls.master,v 1.39 2002/04/28 17:21:59 manu Exp
+ * created from NetBSD: syscalls.master,v 1.40 2002/04/28 20:23:22 manu Exp
*/
/* syscall: "syscall" ret: "int" args: */
@@ -403,5 +403,8 @@
/* syscall: "pidsprocsp" ret: "irix_pid_t" args: "void *" "unsigned int" "void *" "caddr_t" "irix_size_t" "irix_pid_t" */
#define IRIX_SYS_pidsprocsp 210
+/* syscall: "usync_cntl" ret: "int" args: "int" "void *" */
+#define IRIX_SYS_usync_cntl 223
+
#define IRIX_SYS_MAXSYSCALL 236
#define IRIX_SYS_NSYSENT 236
diff -r e12b1ed3b5bf -r d1ba553e7a4a sys/compat/irix/irix_syscallargs.h
--- a/sys/compat/irix/irix_syscallargs.h Mon Apr 29 13:42:42 2002 +0000
+++ b/sys/compat/irix/irix_syscallargs.h Mon Apr 29 14:40:23 2002 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: irix_syscallargs.h,v 1.41 2002/04/28 20:23:22 manu Exp $ */
+/* $NetBSD: irix_syscallargs.h,v 1.42 2002/04/29 14:40:23 manu Exp $ */
/*
* System call argument lists.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from NetBSD: syscalls.master,v 1.39 2002/04/28 17:21:59 manu Exp
+ * created from NetBSD: syscalls.master,v 1.40 2002/04/28 20:23:22 manu Exp
*/
#ifndef _IRIX_SYS__SYSCALLARGS_H_
@@ -217,6 +217,11 @@
syscallarg(irix_pid_t) pid;
};
+struct irix_sys_usync_cntl_args {
+ syscallarg(int) cmd;
+ syscallarg(void *) arg;
+};
+
/*
* System call prototypes.
*/
@@ -358,4 +363,5 @@
int irix_sys_ngetdents(struct proc *, void *, register_t *);
int irix_sys_ngetdents64(struct proc *, void *, register_t *);
int irix_sys_pidsprocsp(struct proc *, void *, register_t *);
+int irix_sys_usync_cntl(struct proc *, void *, register_t *);
#endif /* _IRIX_SYS__SYSCALLARGS_H_ */
diff -r e12b1ed3b5bf -r d1ba553e7a4a sys/compat/irix/irix_syscalls.c
--- a/sys/compat/irix/irix_syscalls.c Mon Apr 29 13:42:42 2002 +0000
+++ b/sys/compat/irix/irix_syscalls.c Mon Apr 29 14:40:23 2002 +0000
@@ -1,14 +1,14 @@
-/* $NetBSD: irix_syscalls.c,v 1.41 2002/04/28 20:23:22 manu Exp $ */
+/* $NetBSD: irix_syscalls.c,v 1.42 2002/04/29 14:40:23 manu Exp $ */
/*
* System call names.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from NetBSD: syscalls.master,v 1.39 2002/04/28 17:21:59 manu Exp
+ * created from NetBSD: syscalls.master,v 1.40 2002/04/28 20:23:22 manu Exp
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: irix_syscalls.c,v 1.41 2002/04/28 20:23:22 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irix_syscalls.c,v 1.42 2002/04/29 14:40:23 manu Exp $");
#if defined(_KERNEL_OPT)
#if defined(_KERNEL_OPT)
@@ -270,7 +270,7 @@
"#220 (unimplemented sched_setscheduler)", /* 220 = unimplemented sched_setscheduler */
"#221 (unimplemented sched_getparam)", /* 221 = unimplemented sched_getparam */
"#222 (unimplemented sched_setparam)", /* 222 = unimplemented sched_setparam */
- "#223 (unimplemented usync_cntl)", /* 223 = unimplemented usync_cntl */
+ "usync_cntl", /* 223 = usync_cntl */
"#224 (unimplemented psema_cntl)", /* 224 = unimplemented psema_cntl */
"#225 (unimplemented restartreturn)", /* 225 = unimplemented restartreturn */
"#226 (unimplemented sysget)", /* 226 = unimplemented sysget */
diff -r e12b1ed3b5bf -r d1ba553e7a4a sys/compat/irix/irix_sysent.c
--- a/sys/compat/irix/irix_sysent.c Mon Apr 29 13:42:42 2002 +0000
+++ b/sys/compat/irix/irix_sysent.c Mon Apr 29 14:40:23 2002 +0000
@@ -1,14 +1,14 @@
-/* $NetBSD: irix_sysent.c,v 1.41 2002/04/28 20:23:22 manu Exp $ */
+/* $NetBSD: irix_sysent.c,v 1.42 2002/04/29 14:40:23 manu Exp $ */
/*
* System call switch table.
*
* DO NOT EDIT-- this file is automatically generated.
- * created from NetBSD: syscalls.master,v 1.39 2002/04/28 17:21:59 manu Exp
+ * created from NetBSD: syscalls.master,v 1.40 2002/04/28 20:23:22 manu Exp
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: irix_sysent.c,v 1.41 2002/04/28 20:23:22 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irix_sysent.c,v 1.42 2002/04/29 14:40:23 manu Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ntp.h"
@@ -496,8 +496,8 @@
sys_nosys }, /* 221 = unimplemented sched_getparam */
{ 0, 0, 0,
sys_nosys }, /* 222 = unimplemented sched_setparam */
- { 0, 0, 0,
- sys_nosys }, /* 223 = unimplemented usync_cntl */
+ { 2, s(struct irix_sys_usync_cntl_args), 0,
+ irix_sys_usync_cntl }, /* 223 = usync_cntl */
{ 0, 0, 0,
sys_nosys }, /* 224 = unimplemented psema_cntl */
{ 0, 0, 0,
diff -r e12b1ed3b5bf -r d1ba553e7a4a sys/compat/irix/irix_usync.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/compat/irix/irix_usync.c Mon Apr 29 14:40:23 2002 +0000
@@ -0,0 +1,74 @@
+/* $NetBSD: irix_usync.c,v 1.1 2002/04/29 14:40:23 manu Exp $ */
+
+/*-
+ * Copyright (c) 2002 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Emmanuel Dreyfus.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: irix_usync.c,v 1.1 2002/04/29 14:40:23 manu Exp $");
+
+#include <sys/types.h>
+#include <sys/signal.h>
+#include <sys/param.h>
+#include <sys/mount.h>
+#include <sys/proc.h>
+#include <sys/systm.h>
+#include <sys/syscallargs.h>
+
+#include <compat/irix/irix_types.h>
+#include <compat/irix/irix_usync.h>
+#include <compat/irix/irix_signal.h>
+#include <compat/irix/irix_syscallargs.h>
+
+int
+irix_sys_usync_cntl(p, v, retval)
+ struct proc *p;
+ void *v;
+ register_t *retval;
+{
+ struct irix_sys_usync_cntl_args /* {
+ syscallarg(int) cmd;
+ syscallarg(void *) arg;
+ } */ *uap = v;
+
+ switch (SCARG(uap, cmd)) {
+ default:
+ printf("Warning: unimplemented IRIX usync_cntl command %d\n",
+ SCARG(uap, cmd));
+ return EINVAL;
+ }
+
+ return 0;
+}
diff -r e12b1ed3b5bf -r d1ba553e7a4a sys/compat/irix/irix_usync.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/compat/irix/irix_usync.h Mon Apr 29 14:40:23 2002 +0000
@@ -0,0 +1,53 @@
+/* $NetBSD: irix_usync.h,v 1.1 2002/04/29 14:40:23 manu Exp $ */
+
+/*-
+ * Copyright (c) 2002 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Emmanuel Dreyfus.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _IRIX_USYNCL_H_
+#define _IRIX_USYNCL_H_
+
+/* usync_fcntl() commands, undocumented in IRIX */
+#define IRIX_USYNC_BLOCK 1
+#define IRIX_USYNC_INTR_BLOCK 2
+#define IRIX_USYNC_UNBLOCK_ALL 3
+#define IRIX_USYNC_UNBLOCK 4
+#define IRIX_USYNC_NOTIFY_REGISTER 5
+#define IRIX_USYNC_NOTIFY 6
+#define IRIX_USYNC_NOTIFY_DELETE 7
+#define IRIX_USYNC_NOTIFY_CLEAR 8
+#define IRIX_USYNC_GET_STATE 11
+
+#endif /* _IRIX_USYNC_H */
diff -r e12b1ed3b5bf -r d1ba553e7a4a sys/compat/irix/syscalls.master
--- a/sys/compat/irix/syscalls.master Mon Apr 29 13:42:42 2002 +0000
+++ b/sys/compat/irix/syscalls.master Mon Apr 29 14:40:23 2002 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.40 2002/04/28 20:23:22 manu Exp $
+ $NetBSD: syscalls.master,v 1.41 2002/04/29 14:40:23 manu Exp $
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
@@ -375,7 +375,7 @@
220 UNIMPL sched_setscheduler
221 UNIMPL sched_getparam
222 UNIMPL sched_setparam
-223 UNIMPL usync_cntl
+223 STD { int irix_sys_usync_cntl(int cmd, void *arg); }
224 UNIMPL psema_cntl
225 UNIMPL restartreturn
226 UNIMPL sysget
Home |
Main Index |
Thread Index |
Old Index