Commit Graph

25 Commits

Author SHA1 Message Date
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
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 108d17eb16 Do the md_syscall, __HAVE_MINIMAL_EMUL and __HAVE_SYSCALL_INTERN thangs. 2000-12-13 03:16:36 +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 cc5b7ecb22 put the ecoff specific code from osf1_exec.c to osf1_exec_ecoff.c 2000-12-08 21:39:30 +00:00
jdolecek e0c059250f emul_osf1: add flags EMUL_GETPID_PASS_PPID|EMUL_GETID_PASS_EID 2000-12-01 19:20:22 +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
itojun fdbcde1abe more COMPAT_OSF1 fix (exec_conf.c conversion?) 2000-11-22 03:56:52 +00:00
itojun 6c7e531e99 make COMPAT_OSF1 to compile. not tested (could someone review?). 2000-11-22 03:48:33 +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
cgd 3da80f5ebd don't vrele a bogus pointer if the namei() of the loader fails 1999-05-28 04:39:14 +00:00
cgd 3b5a8a7db7 shuffle (sort) 1999-05-05 01:51:31 +00:00
cgd 170b003d0b shuffle bits around. separate conversion conversion functions and tables
from the code that uses them, just as I previously separated out the
OSF/1 definitions and structures from the code that translates to and
from them.
1999-05-01 02:57:08 +00:00
cgd 1bce8c40fc ep_arglen is in units of 'sizeof (char *)', not in units of bytes. use
howmany(value, sizeof (char *)) to get the right value.
1999-04-30 23:02:06 +00:00
cgd 94a4e36ed2 use osf1-specific sigcode 1999-04-30 01:46:09 +00:00
cgd fc1142ac44 be more careful about getting the exec_name emul arg field 1999-04-28 02:49:38 +00:00
cgd 6ef8f59ae6 dynamic executable/loader handling, done right 1999-04-27 05:38:08 +00:00
cgd 743038a6cb clean up for ecoff_machdep.h changes, look for the loader 1999-04-27 03:19:44 +00:00
cgd fe6198f6e2 do special OSF/1-specific ECOFF recognition (not yet complete), and
implement a copyargs function to do special argument copying for
emulated processes.
1999-04-27 01:45:03 +00:00
cgd bd33916784 exec internals have been moved (and improved) to osf1_exec.c. Not much
there yet, but more to come.
1999-04-26 18:34:05 +00:00