Commit Graph

170 Commits

Author SHA1 Message Date
matt 74ca33774a only include i386/include/reg.h on i386. 2000-02-27 17:30:10 +00:00
matt 897c73a03a Fix wait case for VAX SVR3. 2000-01-13 06:33:29 +00:00
matt a0bcad1505 move to ibcs2_sysi86 to arch/i386/i386/ibcs2_machdep.c.
XXX -- still need to properly MI the waitsys code.
2000-01-10 03:16:25 +00:00
matt 8e42885010 Clean things up. Only include the ELF EXEC iff EXEC_ELF32 is already
asserted.

XXX -- this should mutate into kern/exec_coff someday with a cpu_coff_hooks
ala ecoff support.
2000-01-10 03:14:56 +00:00
matt 47b5b640a7 Regen. 2000-01-10 03:12:19 +00:00
matt 61783809dc rename ibcs2_sysi86 to ibcs2_sysmachine (since ibcs2 now runs on other
things than i386).
2000-01-10 03:10:15 +00:00
kleink 522cbf0248 Update to match new SVR4-style definition names in <sys/exec_elf.h>. 1999-10-25 13:55:06 +00:00
thorpej 2c358fca82 Update for new msgctl()/semctl()/shmctl() calls. 1999-08-25 04:52:06 +00:00
thorpej e3669c3393 Add "use counting" to file entries. When closing a file, and it's reference
count is 0, wait for use count to drain before finishing the close.

This is necessary in order for multiple processes to safely share file
descriptor tables.
1999-05-05 20:01:01 +00:00
cgd af8a9059d3 compute the value to be used for e_arglen via howmany(value, sizeof (char *)),
rather than just "value / sizeof (char *)".  While in these cases the latter
works as well, the former's a better example for other uses to copy (since
it handles the non-integral multiple case correctly).
1999-04-30 23:07:01 +00:00
christos 03ff6653d6 Regen 1999-02-09 20:48:20 +00:00
christos 415ae8f732 const poisoning 1999-02-09 20:21:18 +00:00
jtk 77b1ebc172 fix gcc complaint about assignment in truth value 1999-01-14 15:00:38 +00:00
sommerfe 465d57ee26 Commit fix from PR1623 1999-01-13 23:41:29 +00:00
augustss 0d32a9a78b Fix more `void *' arithmetic. 1999-01-08 19:22:34 +00:00
drochner ba4af3c3de regen 1998-12-18 18:59:06 +00:00
drochner b71f154130 remove compat_xxx dependencies where they don't belong 1998-12-18 18:49:59 +00:00
christos f0c7751046 Regen 1998-12-10 17:13:06 +00:00
christos b0b86b5b7f Defopt COMPAT_43 1998-12-10 17:03:19 +00:00
mjacob 3de1dbaf24 add missing include that defined native_to_ibcs2_errno 1998-10-23 19:45:59 +00:00
erh 36d1163663 Move ibcs2_error.c back to ibcs2_errno.c. Old name was more descriptive. Make it more so and use "native_to_ibcs2_errno". 1998-10-23 03:22:59 +00:00
tron c716a334aa Regen. 1998-10-19 22:36:29 +00:00
tron 6d456ade27 Defopt SYSVMSG, SYSVSEM and SYSVSHM. 1998-10-19 22:34:49 +00:00
christos e26890e06b Rename ibcs2_errno.c -> ibcs2_error.c to match with linux and svr4 1998-10-18 16:59:14 +00:00
eeh fc6c67ff5d Fixup big-endian syscall args. 1998-10-03 19:33:32 +00:00
mycroft 584cc642fc Regen. 1998-09-12 10:33:26 +00:00
mycroft 89ea1fcbdd Version sys_sigreturn, to avoid breaking programs that use it explicitly. 1998-09-12 00:47:12 +00:00
mycroft f384c47bc7 Regen. 1998-09-11 23:13:32 +00:00
mycroft fb526e055c Substantial signal handling changes:
* Increase the size of sigset_t to accomodate 128 signals -- adding new
  versions of sys_setprocmask(), sys_sigaction(), sys_sigpending() and
  sys_sigsuspend() to handle the changed arguments.
* Abstract the guts of sys_sigaltstack(), sys_setprocmask(), sys_sigaction(),
  sys_sigpending() and sys_sigsuspend() into separate functions, and call them
  from all the emulations rather than hard-coding everything.  (Avoids uses
  the stackgap crap for these system calls.)
* Add a new flag (p_checksig) to indicate that a process may have signals
  pending and userret() needs to do the full (slow) check.
* Eliminate SAS_ALTSTACK; it's exactly the inverse of SS_DISABLE.
* Correct emulation bugs with restoring SS_ONSTACK.
* Make the signal mask in the sigcontext always use the emulated mask format.
* Store signals internally in sigaction structures, rather than maintaining a
  bunch of little sigsets for each SA_* bit.
* Keep track of where we put the signal trampoline, rather than figuring it out
  in *_sendsig().
* Issue a warning when a non-emulated sigaction bit is observed.
* Add missing emulated signals, and a native SIGPWR (currently not used).
* Implement the `not reset when caught' semantics for relevant signals.

Note: Only code touched by the i386 port has been modified.  Other ports and
emulations need to be updated.
1998-09-11 12:50:05 +00:00
rvb 26b955eec7 ufs_readdir no longer checks if vp->v_type != VDIR so
the individual emulated readdirs must check.
Since netbsd and freebsd return EINVAL for the error
and I don't know what the other platforms do, return
EINVAL for them too.
1998-09-08 20:02:51 +00:00
christos 8fb507a3b7 Assign copyright to TNF. 1998-09-05 14:50:25 +00:00
perry e1601dc2ca bzero->memset, bcopy->memcpy, bcmp->memcmp 1998-08-09 20:36:58 +00:00
thorpej 37b70b3064 Change the "aresid" argument of vn_rdwr() from an int * to a size_t *,
to match the new uio_resid type.
1998-07-28 21:39:54 +00:00
scottb fe00c5db7f fix typo that broke directory read emulation. 1998-06-28 01:20:06 +00:00
scottb 297f065eec Duplicated null cookiebuf check from ibcs2_sys_getdents to ibcs2_sys_read. 1998-03-05 04:49:50 +00:00
scottb 9273595150 Added support for ibcs2_sigcode.
Added new emulation structure, emul_ibcs2_xout, for XENIX.
Modified some syscalls to differentiate between XENIX and UNIX.
Fixed major bug in semaphore structure emulation size and conversion.
Check and cleanup copyin/copyout usage.
Add xenix_sys_locking patches from Andreas Wrede <andreas@planix.com>.
1998-03-05 04:36:07 +00:00
fvdl a377495cfb Only free cookiebuf when sure that the vop actually allocated it. 1998-03-03 13:44:48 +00:00
fvdl e5bc90f40c Merge with Lite2 + local changes 1998-03-01 02:20:01 +00:00
thorpej dc4fe3d32d Regen: makesyscalls.sh changed. 1998-02-19 03:34:15 +00:00
thorpej 85363653a7 regen; makesyscalls.sh changed. 1998-02-19 00:40:44 +00:00
thorpej 9f6ec3eb67 Change a comment to reflect new makesyscalls.sh behavior. 1998-02-19 00:40:25 +00:00
kleink 81f5f29918 Regen: sys_fchown() -> sys___posix_fchown(). 1998-02-14 21:03:48 +00:00
kleink 5d1d29ff65 Use sys___posix_fchown() instead of sys_fchown(). 1998-02-14 20:58:21 +00:00
kleink 5c1fbd0e44 * chown(): use sys___posix_chown().
* rename():  change reference to sys___posix_rename().
1998-02-14 20:52:47 +00:00
kleink 552ec236a0 Map ENOMSG. 1998-02-10 14:37:38 +00:00
scottb 2ee5fa7f17 iBCS2 code cleanup
added support for ELF binaries
added support for ELF shared libs via mmap code borrowed from svr4_misc.c
incorporated a few XENIX patches from Andreas Wrede <andreas@planix.com>
1998-02-09 02:30:42 +00:00
mikel 4de16acd9c update errno maps, we now have EIDRM 1998-02-06 08:26:02 +00:00
thorpej 80fff795f9 Regen. 1998-01-09 06:19:02 +00:00
thorpej 585f0dec73 Regen: back out RCD ID related changes. 1998-01-08 00:17:11 +00:00
perry 36bd5a5407 regened with RCSIDs in place 1998-01-05 18:23:00 +00:00
perry 3c47900572 RCSID Police. 1998-01-05 17:51:27 +00:00
thorpej 14cd99880c Fix the shared library versioning snafu caused by the recent changes
to the stat(2) family and msync(2).  This uses a primitive function
versioning scheme.

This reverts the libc shared library major version from 13 to 12, and
adds a few new interfaces to bring us to libc version 12.20.

From Frank van der Linden <fvdl@NetBSD.ORG>.
1997-10-20 22:05:06 +00:00
christos 9b775fa66f change it to use the real stat instead of ostat and check for st_link overflow 1997-10-16 23:52:20 +00:00
fvdl d85f38cbec Fix braino in my interpretation of the eof flag to VOP_READDIR. 1997-10-10 22:16:04 +00:00
fvdl d6e5e295fa Signal error when getting a 64 bit offset cookie that can't be stored
in 32 bits. Provide an error message to the user, and return EINVAL.
Also, pay attention to the EOF flag from VOP_READDIR. Correct a
misspell in a panic message.
1997-10-10 01:42:21 +00:00
jtk 4e51e62639 implement IBCS2_FIONBIO
(code by Christos Zoulas; tested by me)
1997-09-19 21:57:10 +00:00
mycroft 99a6404735 Add an ibcs2_setregs(). 1997-09-11 23:05:30 +00:00
mycroft 3f70f046fc Fix wait(2) and waitpid(2) emulation; it's the responsibility of the syscall
stub to copy %edx to *status, and trying to do it here loses with some libc
versions.
1997-09-11 23:05:02 +00:00
mycroft a6aa4731bc Fix errors left over from system call conversion. 1997-09-09 21:14:00 +00:00
bouyer 1cd83a5971 Fix "missing entries" bug when reading large directories: When reading a
directory and running out of space in the dest buffer, off should point to the
current entry (which was not saved) and not to the next.
I discovered this bug using linux and SunOS emulation over NFS, but seems to
affect other emulations as well.
1997-08-04 09:48:07 +00:00
pk e3680b0e26 config.new => config 1997-07-20 20:33:08 +00:00
kleink 96588fead9 Use sys_posix_rename() instead of sys_rename() as it's the behaviour of the
native implementation.
1997-06-27 05:29:34 +00:00
mycroft e3f99a9397 Pass the vnode type to vaccess(), and use it when checking VEXEC. Make sure
that the mode bits passed to vaccess() and returned by foo_getattr() contain
only permission bits.
1997-05-08 16:19:43 +00:00
mycroft 837a72363d VEXEC -> VLOOKUP, as appropriate. 1997-05-08 10:57:17 +00:00
gwr 9228e630d5 s/boot/cpu_reboot/ 1997-03-26 23:44:27 +00:00
mycroft dc3a674a08 Actually include the code conditionally, based on the SYSV* options. 1997-01-18 01:51:41 +00:00
perry b89a3425b7 Eliminate obsolete TIMEZONE and DST options.
Eliminate obsolete global kernel variable "struct timezone tz"
Add RTC_OFFSET option
Add global kernel variable rtc_offset, which is initialized by
RTC_OFFSET at kernel compile time.
on i386, x68k, mac68k, pc532 and arm32, RTC_OFFSET indicates how many
minutes west (east) of GMT the hardware RTC runs. Defaults to 0.
Places where tz variable was used to indicate this in the past have
been replaced with rtc_offset.
Add sysctl interface to rtc_offset.
Kill obsolete DST_* macros in sys/time.h
gettimeofday now always returns zeroed timezone if zone is requested.
settimeofday now ignores and logs attempts to set non-existant kernel
timezone.
1997-01-15 01:28:28 +00:00
thorpej 8f8abcd69c Regen; makesyscalls.sh emits comments now. 1997-01-13 18:49:02 +00:00
fvdl bb31faf853 Make this compile again, including Politically Correct const handling. 1996-12-22 23:00:02 +00:00
christos 53e42f3487 Backout previous kprintf change. 1996-10-13 00:46:49 +00:00
thorpej 9c7bb13aeb Include <sys/exec.h> 1996-10-12 02:13:52 +00:00
christos 5476886e52 printf -> kprintf, sprintf -> ksprintf 1996-10-10 17:47:29 +00:00
ws 2da166f660 Fix p_nice vs. NZERO code.
Change NZERO to 20 to always make p_nice positive.
On Christos' suggestion make p_nice explicitly u_char.
1996-10-02 18:04:56 +00:00
mycroft 826fb76b6f Regen. 1996-09-07 14:24:17 +00:00
mycroft 1449e67e30 Modify poll(2) prototype. 1996-09-07 14:20:09 +00:00
mycroft 264dd4757c Regen. 1996-09-07 12:56:49 +00:00
mycroft 2bc736661a Implement poll(2). 1996-09-07 12:40:22 +00:00
mycroft 5de9f548a2 Give every emulation its own Makefile for the syscall table. 1996-09-03 03:18:04 +00:00
mycroft a8fd25767d Define execv() and execve() consistently across emulations.
Do path name translation.
1996-09-03 03:12:17 +00:00
mycroft 65605b0484 Fix bogus offset calculation in ibcs2_sys_read(), per PR 1804. 1996-09-03 02:44:14 +00:00
mycroft 118b9b478d sys/dir.h -> sys/dirent.h 1996-08-10 09:08:26 +00:00
mrg 5abbf990f3 Change reboot(2) to take two arguments: bootopt like normal and also
a boot string for firmware that can do this, such as the SPARC and
the sun3 models.  It is currently silently ignored on all other
hardware now, however.  The MD function "boot()" has been changed to
also take a char *.
1996-08-09 10:30:23 +00:00
mycroft fdc697b5e9 Catch up with setre[ug]id() changes. 1996-06-23 11:17:50 +00:00
christos a9972e1bbb - RCSid police
- gcc -Wall fixes
1996-05-03 17:05:16 +00:00
mycroft 6761817ae6 Correct name of sysi86 function. 1996-01-07 06:09:43 +00:00
scottb 382f551ca1 Added support for sysi86 and eaccess syscalls 1996-01-06 03:23:46 +00:00
mycroft 3872a4ba45 Take a stab at implementing TCXONC and TCFLSH. 1995-12-26 17:56:36 +00:00
gwr 883be4be3a ufs ==> ffs 1995-11-07 22:27:21 +00:00
mycroft d279b4198a Convert VMIN and VTIME. 1995-10-10 02:35:16 +00:00
mycroft 652c9eff74 Use cookies for directory offset, mostly from Greg Hudson. 1995-10-09 11:23:57 +00:00
mycroft 55c46e9514 Reran makesyscalls.sh. 1995-10-07 06:41:34 +00:00
mycroft 245f292fed Prefix names of system call implementation functions with `sys_'. 1995-10-07 06:25:19 +00:00
thorpej b5a39bba19 Make system calls conform to a standard prototype and bring those
prototypes into scope.

Fix a couple of bugs revealed during the prototyping process.
1995-09-19 22:19:01 +00:00
thorpej d95577b1ce makesyscalls.sh changed. 1995-09-19 22:13:07 +00:00
mycroft d2c9e4f1c8 Export bsd_to_ibcs2_sig[], and use it. 1995-08-14 02:26:01 +00:00
mycroft 283f211782 Sort. 1995-08-14 01:34:09 +00:00
mycroft 01fa87477a syscalls.master changed. 1995-08-14 01:29:05 +00:00
mycroft 88b8e43a80 Rearrange #includes. 1995-08-14 01:27:43 +00:00
mycroft eba2f2e81a Move signal types into signal.h. 1995-08-14 01:11:52 +00:00
mycroft 475edc261c Move definition of sigset_t into types.h. 1995-08-14 00:50:27 +00:00