Commit Graph

35 Commits

Author SHA1 Message Date
jdolecek ef8abe0767 Make the setregs hook emulation-specific, rather than executable
format specific.
Struct emul has a e_setregs hook back, which points to emulation-specific
setregs function. es_setregs of struct execsw now only points to
optional executable-specific setup function (this is only used for
ECOFF).
2001-09-18 19:36:32 +00:00
christos 0f380fac15 Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.
2001-06-18 02:00:48 +00:00
manu a7cdf998ec Removed obsoletes EMUL_NO_BSD_ASYNCIO_PIPE and EMUL_NO_SIGIO_ON_READ flags.
Async I/O OS specifities should now handled in OS specific code. Linux
has been done, but other emulation should be handled. See case LINUX_F_SETFL
in sys/compat/linux/common/linux_file.c:linux_sys_fcntl() for more details.

The data that has been collected yet:

                                  Net Free Open Linux SunOS AIX OSF1 Darwin
send SIGIO to write end of pipe		Y  N    N     N     N    N   Y     Y
send SIGIO to read end of pipe      Y  Y    N     N     N    ?   Y     ?
send SIGIO to write end of socket   Y  Y    Y     N     N    Y   Y     Y
send SIGIO to read end of socket    Y  Y    Y     Y     Y    ?   Y     ?
2001-06-16 21:44:27 +00:00
mrg 6a89288a37 use _KERNEL_OPT. 2001-05-30 11:37:21 +00:00
manu 7e6929fe90 Changed EMUL_BSD_ASYNCIO_PIPE to EMUL_NO_BSD_ASYNCIO_PIPE, so that
the native emulation (NetBSD) does not have a flag.
2001-05-07 09:55:12 +00:00
manu 5a6b8191b5 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.
2001-05-06 19:09:52 +00:00
mycroft f495cd9dc6 Introduce 2 new flags in types.h:
* __HAVE_SYSCALL_INTERN.  If this is defined, e_syscall is replaced by
  e_syscall_intern, which is called at key places in the kernel.  This can be
  used to set a MD syscall handler pointer.  This obsoletes and replaces the
  *_HAS_SEPARATED_SYSCALL flags.
* __HAVE_MINIMAL_EMUL.  If this is defined, certain (deprecated) elements in
  struct emul are omitted.
2000-12-11 05:28:59 +00:00
jdolecek a6ca890142 always fill in e_syscall in respective emul_*; if the emulation doesn't
have it's own separated *_syscall() function, use syscall()
2000-12-09 12:38:23 +00:00
mycroft 9b7a9b2897 Get rid of the damn EMUL_GET* flags. 2000-12-09 07:10:34 +00:00
jdolecek 36e6e46132 put aout specific sunos code from sunos_exec.c to separate file
sunos_exec_aout.c
make LKM safe
add EMUL_GETPID_PASS_PPID|EMUL_GETID_PASS_EID to emul_sunos flags
2000-12-01 19:24:36 +00:00
jdolecek 81f0543ba6 fix the emulation path 2000-12-01 13:21:37 +00:00
jdolecek 01040d97a2 add e_path (emulation path) to struct emul, which replaces emulation-specific
*_emul_path variables

change macros CHECK_ALT_{CREAT|EXIST} to use that, 'root' doesn't need
to be passed explicitly any more and *_CHECK_ALT_{CREAT|EXIST} are removed
change explicit emul_find() calls in probe functions to get the emulation
path from the checked exec switch entry's emulation

remove no longer needed header files

add e_flags and e_syscall to struct emul; these are unsed and empty for now
2000-12-01 12:28:30 +00:00
scw 7d7a448f88 Make these compile with the latest execsw[] changes. Someone with
SunOS binaries needs to test this...
2000-11-24 10:21:30 +00:00
jdolecek baae0324b9 restructure struct emul and execsw, in preparation to make emulations LKMable:
* move all exec-type specific information from struct emul to execsw[] and
  provide single struct emul per emulation
* elf:
  - kern/exec_elf32.c:probe_funcs[] is gone, execsw[] how has one entry
    per emulation and contains pointer to respective probe function
  - interp is allocated via MALLOC() rather than on stack
  - elf_args structure is allocated via MALLOC() rather than malloc()
* ecoff: the per-emulation hooks moved from alpha and mips specific code
  to OSF1 and Ultrix compat code as appropriate, execsw[] has one entry per
  emulation supporting ecoff with appropriate probe function
* the makecmds/probe functions don't set emulation, pointer to emulation is
  part of appropriate execsw[] entry
* constify couple of structures
2000-11-21 00:37:49 +00:00
jdolecek 78b866e95a change the type of *syscallnames[] array to 'const char * const foo[]' 2000-11-13 21:32:15 +00:00
mrg 13f211c52e remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h> 2000-06-28 15:39:24 +00:00
soren a9aa2abf94 defopt SYSCALL_DEBUG. 2000-06-06 18:52:30 +00:00
chs a6d33cc1f2 add a new function vn_marktext() for exec code to let others know
that the vnode is now being used as process text.
2000-04-11 04:37:47 +00:00
christos 4c1bb7794a Need sunos_sigcode and sunos_esigcode now that our sigreturn is
different.
1999-04-29 16:14:04 +00:00
drochner 74768f75f4 remove unneeded <vm/*> includes 1999-04-01 18:37:33 +00:00
pk 459204606f Everyone uses sunos_sendsig(). 1998-09-13 21:05:35 +00:00
mrg fe3c14b64d use __sparc__ not sparc 1998-08-09 03:12:39 +00:00
tv 0a558b3f1f Standardize COMPAT_SUNOS -- remove all references to
sunos_exec_aout_makecmds() in machdep.c for various architectures and put
it in exec_conf.c like the other emulations; rename exec.h to
sunos_exec.h.
1997-12-04 15:33:17 +00:00
cgd 6ab18a1959 don't include <machine/exec.h> explicitly. No other changes needed, since
<sys/exec.h> was already being included.
1996-10-07 21:43:02 +00:00
briggs 8b8a6fcf2f Put prototype for sunos_sendsig() in sunos.h as suggested by veego. 1996-05-05 12:01:45 +00:00
christos fc8b478bdd Bring prototypes into scope and fix compiler warnings. 1996-03-14 19:33:44 +00:00
briggs 09e0072b98 Add sunos_emul_path (/emul/sunos). I don't know if this is correct, but
this will at least aid the compilation step and is similar to the
others.
1995-06-25 14:15:08 +00:00
christos 44eef7c28b - added struct emul to all emulations.
- removed all setup functions.
- added copyargs() functions where needed.
1995-04-22 19:48:19 +00:00
deraadt 019f48332c rename, new syscall interface, etc. 1994-10-25 23:03:22 +00:00
gwr ba188a61a0 Avoid some macro redefinitions that have appeared since exec.h
now includes exec_aout.h
1994-07-12 00:34:31 +00:00
cgd cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
jtc 5235180083 Fix spelling error in Copyright notice 1994-01-28 23:43:26 +00:00
deraadt ac51029167 for new exec, from mw 1994-01-28 03:41:44 +00:00
deraadt 9d48733fb1 m68k/sparc sunos binary compatibility code, pulled down from magnum branch
for consumption by the m68k masses
1993-12-12 20:43:18 +00:00
deraadt 6ce3f214d1 compat exec() stuff is done more sensibly now
(hpux and ultrix compat stuff will be done the same way)
1993-11-28 18:03:18 +00:00