Source-Changes-HG archive

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

[src/trunk]: src/sys Added two flags to emulation packages:



details:   https://anonhg.NetBSD.org/src/rev/f659c413b5a6
branches:  trunk
changeset: 509530:f659c413b5a6
user:      manu <manu%NetBSD.org@localhost>
date:      Sun May 06 19:09:52 2001 +0000

description:
Added two flags to emulation packages:

EMUL_BSD_ASYNCIO_PIPE notes that the emulated binaries expect the original
BSD pipe behavior for asynchronous I/O, which is to fire SIGIO on read() and
write(). OSes without this flag do not expect any SIGIO to be fired on
read() and write() for pipes, even when async I/O was requested. As far as
we know, the OSes that need EMUL_BSD_ASYNCIO_PIPE are NetBSD, OSF/1 and
Darwin.

EMUL_NO_SIGIO_ON_READ notes that the emulated binaries that requested
asynchrnous I/O expect the reader process to be notified by a SIGIO, but
not the writer process. OSes without this flag expect the reader and the
writer to be notified when some data has arrived or when some data have been
read. As far as we know, the OSes that need EMUL_NO_SIGIO_ON_READ are Linux
and SunOS.

diffstat:

 sys/compat/linux/common/linux_exec.c |  4 ++--
 sys/compat/osf1/osf1_exec.c          |  4 ++--
 sys/compat/sunos/sunos_exec.c        |  4 ++--
 sys/compat/sunos32/sunos32_exec.c    |  4 ++--
 sys/kern/kern_exec.c                 |  4 ++--
 sys/sys/proc.h                       |  9 +++++++--
 6 files changed, 17 insertions(+), 12 deletions(-)

diffs (121 lines):

diff -r 1ca2c379b131 -r f659c413b5a6 sys/compat/linux/common/linux_exec.c
--- a/sys/compat/linux/common/linux_exec.c      Sun May 06 18:38:58 2001 +0000
+++ b/sys/compat/linux/common/linux_exec.c      Sun May 06 19:09:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_exec.c,v 1.48 2001/03/24 11:13:04 jdolecek Exp $ */
+/*     $NetBSD: linux_exec.c,v 1.49 2001/05/06 19:09:52 manu Exp $     */
 
 /*-
  * Copyright (c) 1994, 1995, 1998, 2000 The NetBSD Foundation, Inc.
@@ -113,7 +113,7 @@
        "linux",
        "/emul/linux",
 #ifndef __HAVE_MINIMAL_EMUL
-       0,
+       EMUL_NO_SIGIO_ON_READ,
        (int*)native_to_linux_errno,
        LINUX_SYS_syscall,
        LINUX_SYS_MAXSYSCALL,
diff -r 1ca2c379b131 -r f659c413b5a6 sys/compat/osf1/osf1_exec.c
--- a/sys/compat/osf1/osf1_exec.c       Sun May 06 18:38:58 2001 +0000
+++ b/sys/compat/osf1/osf1_exec.c       Sun May 06 19:09:52 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_exec.c,v 1.21 2000/12/13 03:16:39 mycroft Exp $ */
+/* $NetBSD: osf1_exec.c,v 1.22 2001/05/06 19:09:53 manu Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -52,7 +52,7 @@
        "osf1",
        "/emul/osf1",
 #ifndef __HAVE_MINIMAL_EMUL
-       0,
+       EMUL_BSD_ASYNCIO_PIPE,
        (int *)osf1_errno_rxlist,
        OSF1_SYS_syscall,
        OSF1_SYS_MAXSYSCALL,
diff -r 1ca2c379b131 -r f659c413b5a6 sys/compat/sunos/sunos_exec.c
--- a/sys/compat/sunos/sunos_exec.c     Sun May 06 18:38:58 2001 +0000
+++ b/sys/compat/sunos/sunos_exec.c     Sun May 06 19:09:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sunos_exec.c,v 1.29 2000/12/11 05:29:02 mycroft Exp $  */
+/*     $NetBSD: sunos_exec.c,v 1.30 2001/05/06 19:09:53 manu Exp $     */
 
 /*
  * Copyright (c) 1993 Theo de Raadt
@@ -52,7 +52,7 @@
 struct emul emul_sunos = {
        "sunos",
        "/emul/sunos",
-       0,
+       EMUL_NO_SIGIO_ON_READ,
        NULL,
        SUNOS_SYS_syscall,
        SUNOS_SYS_MAXSYSCALL,
diff -r 1ca2c379b131 -r f659c413b5a6 sys/compat/sunos32/sunos32_exec.c
--- a/sys/compat/sunos32/sunos32_exec.c Sun May 06 18:38:58 2001 +0000
+++ b/sys/compat/sunos32/sunos32_exec.c Sun May 06 19:09:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sunos32_exec.c,v 1.2 2001/02/05 12:48:13 mrg Exp $      */
+/*     $NetBSD: sunos32_exec.c,v 1.3 2001/05/06 19:09:54 manu Exp $     */
 
 /*
  * Copyright (c) 2001 Matthew R. Green
@@ -50,7 +50,7 @@
 struct emul emul_sunos = {
        "sunos32",
        "/emul/sunos",
-       0,
+       EMUL_NO_SIGIO_ON_READ,
        NULL,
        SUNOS32_SYS_syscall,
        SUNOS32_SYS_MAXSYSCALL,
diff -r 1ca2c379b131 -r f659c413b5a6 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c      Sun May 06 18:38:58 2001 +0000
+++ b/sys/kern/kern_exec.c      Sun May 06 19:09:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_exec.c,v 1.138 2001/02/26 20:43:25 lukem Exp $    */
+/*     $NetBSD: kern_exec.c,v 1.139 2001/05/06 19:09:54 manu Exp $     */
 
 /*-
  * Copyright (C) 1993, 1994, 1996 Christopher G. Demetriou
@@ -119,7 +119,7 @@
        "netbsd",
        NULL,           /* emulation path */
 #ifndef __HAVE_MINIMAL_EMUL
-       EMUL_HAS_SYS___syscall,
+       EMUL_HAS_SYS___syscall | EMUL_BSD_ASYNCIO_PIPE,
        NULL,
        SYS_syscall,
        SYS_MAXSYSCALL,
diff -r 1ca2c379b131 -r f659c413b5a6 sys/sys/proc.h
--- a/sys/sys/proc.h    Sun May 06 18:38:58 2001 +0000
+++ b/sys/sys/proc.h    Sun May 06 19:09:52 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: proc.h,v 1.126 2001/04/30 01:13:21 lukem Exp $ */
+/*     $NetBSD: proc.h,v 1.127 2001/05/06 19:09:54 manu Exp $  */
 
 /*-
  * Copyright (c) 1986, 1989, 1991, 1993
@@ -92,7 +92,7 @@
        const char      *e_name;        /* Symbolic name */
        const char      *e_path;        /* Extra emulation path (NULL if none)*/
 #ifndef __HAVE_MINIMAL_EMUL
-       int             e_flags;        /* Miscellaneous flags */
+       int             e_flags;        /* Miscellaneous flags, see above */
                                        /* Syscall handling function */
        const int       *e_errno;       /* Errno array */
        int             e_nosys;        /* Offset of the nosys() syscall */
@@ -119,7 +119,12 @@
 #endif
 };
 
+/* 
+ * Emulation miscelaneous flags
+ */
 #define        EMUL_HAS_SYS___syscall  0x001   /* Has SYS___syscall */
+#define        EMUL_BSD_ASYNCIO_PIPE   0x002 /* BSD style async I/O pipes */
+#define        EMUL_NO_SIGIO_ON_READ   0x004 /* No SIGIO fired on read() calls*/
 
 /*
  * Description of a process.



Home | Main Index | Thread Index | Old Index