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.
This commit is contained in:
parent
0336117218
commit
5a6b8191b5
|
@ -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 @@ const struct emul emul_linux = {
|
|||
"linux",
|
||||
"/emul/linux",
|
||||
#ifndef __HAVE_MINIMAL_EMUL
|
||||
0,
|
||||
EMUL_NO_SIGIO_ON_READ,
|
||||
(int*)native_to_linux_errno,
|
||||
LINUX_SYS_syscall,
|
||||
LINUX_SYS_MAXSYSCALL,
|
||||
|
|
|
@ -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 @@ const struct emul emul_osf1 = {
|
|||
"osf1",
|
||||
"/emul/osf1",
|
||||
#ifndef __HAVE_MINIMAL_EMUL
|
||||
0,
|
||||
EMUL_BSD_ASYNCIO_PIPE,
|
||||
(int *)osf1_errno_rxlist,
|
||||
OSF1_SYS_syscall,
|
||||
OSF1_SYS_MAXSYSCALL,
|
||||
|
|
|
@ -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 @@ void syscall __P((void));
|
|||
struct emul emul_sunos = {
|
||||
"sunos",
|
||||
"/emul/sunos",
|
||||
0,
|
||||
EMUL_NO_SIGIO_ON_READ,
|
||||
NULL,
|
||||
SUNOS_SYS_syscall,
|
||||
SUNOS_SYS_MAXSYSCALL,
|
||||
|
|
|
@ -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 @@ void syscall __P((void));
|
|||
struct emul emul_sunos = {
|
||||
"sunos32",
|
||||
"/emul/sunos",
|
||||
0,
|
||||
EMUL_NO_SIGIO_ON_READ,
|
||||
NULL,
|
||||
SUNOS32_SYS_syscall,
|
||||
SUNOS32_SYS_MAXSYSCALL,
|
||||
|
|
|
@ -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 @@ const struct emul emul_netbsd = {
|
|||
"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,
|
||||
|
|
|
@ -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 @@ struct emul {
|
|||
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 @@ struct emul {
|
|||
#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.
|
||||
|
|
Loading…
Reference in New Issue