Commit Graph

1911 Commits

Author SHA1 Message Date
bouyer 629150f864 Add the sched_suspend/sched_resume functions, as discussed on tech-kern,
with the following modifications to the initial patch:
- rename SHOLD and P_HOST to SSUSPEND and P_SUSPEND to avoid confusion with
  PHOLD()
- don't deal with SSUSPEND/P_SUSPEND in fork1(), if we come here while
  scheduler is suspended we're forking proc0, which can't have P_SUSPEND set.

sched_suspend() suspends the scheduling of users process, by removing all
processes from the run queues and changing their state from SRUN to
SSUSPEND. Also mark all user process but curproc P_SUSPEND.
When a process has to be put in SRUN and is marked P_SUSPEND, it's placed in
the SSUSPEND state instead.
sched_resume() places all SSUSPEND processes back in SRUN, clear the P_SUSPEND
flag.
2000-08-31 14:36:19 +00:00
itohy a1a00824e1 Regen. 2000-08-31 03:49:44 +00:00
itohy e2319847de Add linux_sys_sigaltstack(). 2000-08-31 03:46:30 +00:00
sommerfeld 99d6bcc3e1 more range-checking.
In debug code, limit the size of malloced buffers to a reasonable amount.
2000-08-30 01:13:22 +00:00
sommerfeld 90eb61037d Range-check ioc->len 2000-08-29 15:15:13 +00:00
sommerfeld 6b88a0fc51 Emulation stackgap sanity checks, based partly on fixes from
FreeBSD-SA00:42.

Change stackgap_alloc to bounds-check the allocation vs. the stack
gap, returning NULL if there isn't room for the allocation.

Change emul_find() to check for a NULL return from stackgap_alloc()
and convert that into ENAMETOOLONG.

Reorder various emulation syscalls so that all *_CHECK_ALT_{EXIST,CREAT}
calls (which turn into emul_find() under the covers come *after* small,
fixed-size stackgap_alloc() calls.

Clean up ibcs2 {get,set}groups.
2000-08-29 14:33:25 +00:00
thorpej 4db6fc7542 Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity.  Its use in
roundrobin() still needs some work.
2000-08-25 01:04:06 +00:00
matt 4e1f5ebf66 When reading dir entry by dir entry, we need to pad out the receive buffer
to at least a block to make ufs_readdir happy.
2000-08-23 21:11:47 +00:00
christos e2bcf6b0b5 add support for sigaltstack(2) needed for jvm-1.3 support.
XXX: Only on i386, don't have access to other linuxes...
2000-08-23 17:02:18 +00:00
christos 7f6c062b21 regen 2000-08-23 17:01:20 +00:00
christos 303ab3ee07 add support for syscall 186 [sigaltstack] 2000-08-23 16:59:51 +00:00
mrg 8638251139 declare struct firm_event32 2000-08-22 03:35:14 +00:00
thorpej a616e3a1af splhigh() -> splsched(), and an XXXSMP. 2000-08-21 02:33:04 +00:00
thorpej b4dc5fb0b7 splhigh() -> splsched() 2000-08-21 02:31:59 +00:00
eeh 1e8c5f2119 Fix netbsd32_ioctls. 2000-08-19 14:38:18 +00:00
cgd 0199b04bef update for changed makesyscalls.master 2000-08-18 19:35:15 +00:00
cgd 3af42e5211 update for changed makesyscalls.sh 2000-08-18 19:26:56 +00:00
cgd e539b49106 update for my change to makesyscalls.sh, and apparently previous
changes as well...
2000-08-18 19:25:37 +00:00
cgd 287e8a9edf update for new makesyscalls.sh, and also for correct ids for changed
syscalls.master files.  (you need to regenerate after checking in
syscalls.master to get the correct ids.)
2000-08-18 19:19:50 +00:00
matt 8666ad87ba Fix read problem on directories on UFS. 2000-08-18 17:38:33 +00:00
matt 693b01e5da Fix IBCS2_S_IFWGRP 2000-08-17 15:16:01 +00:00
tron 29e1f8bd9f Use accurate rounding in conversion between OSS and NetBSD volume values.
The optimized integer formula was supplied by Wolfgang Solfrank on
"tech-kern@netbsd.org". This fixes problems with e.g  FreeBSD TV (fxtv),
RealPlayer-7.0 Beta 2 (PR pkg/10818) and KDE's "kscd".
2000-08-16 16:14:33 +00:00
matt 52a3078697 fix some size_t/int confusion. 2000-08-11 22:21:41 +00:00
matt 66617b2137 Add ibcs2_sys_gtty. 2000-08-11 22:20:10 +00:00
matt ef5099c8d8 Use size_t appropriately. 2000-08-11 22:19:29 +00:00
matt e4dc804075 Regen. 2000-08-11 22:17:58 +00:00
matt 4153441571 add ibcs2_sys_gtty 2000-08-11 22:14:07 +00:00
tv 1d8f5f2ea3 Pretend to do something useful (just fill in oldsigaction with SIG_IGN and
zeroes) if the mapped signal number comes up zero.  Previously, sigaction1()
would return an error, confusing some linux apps trying to set handlers for
"all" signals.
2000-08-09 20:20:49 +00:00
itojun a282297e9a regen 2000-08-08 02:15:09 +00:00
itojun eab255c93f s/#ifdefined/#ifdef/ 2000-08-08 02:12:30 +00:00
bjh21 24f9914cb3 Second phase of changes to remove ntp_adjtime(2) from the kernel entirely if
NTP is not defined.

Also removes sysctl_ntptime, since that's unreferenced without NTP.

ntp_gettime(2) is left alone, since it doesn't raise SIGSYS, which sys_nosys()
does.
2000-08-07 18:10:20 +00:00
bjh21 a9397f5bfc Changes to syscalls.master to exclude ntp_adjtime(2) entirely if NTP is not
defined.  Changes to other files will follow in a moment.
2000-08-07 17:59:33 +00:00
itohy 3630c53733 Add #include <sys/proc.h>, since this file touches members of struct proc. 2000-08-07 02:51:04 +00:00
thorpej 7cc27a88c0 Convert namei pathname buffer allocation to use the pool allocator. 2000-08-03 20:41:05 +00:00
jdolecek e25636b5da g/c RB_DFLTROOT
I've tried hard to find also various usage() messages and remove the
appropriate flag from there as well, hopefully all occurences are covered.
2000-07-29 20:06:27 +00:00
tron 597ed25d3d Adoid excessive use of "return" in "excessive()". 2000-07-28 21:49:09 +00:00
tron db4919f6b7 Use "NULL" and not "0" for null pointers. 2000-07-28 21:38:44 +00:00
mrg 705b50bf32 fix LP64 warnings. 2000-07-27 14:00:56 +00:00
pk 9c601e5c64 lstat: since namei() returns an error (EISDIR) if there is no parent to lock,
retry the lookup without LOCKPARENT if that happens. This is safe, since
need to have LOCKPARENT only if the vnode is of type VLNK.
2000-07-26 11:43:07 +00:00
nisimura 7d6022a0db version[] string was const'ifed. Pointed out by Izumi Tsutsui. 2000-07-20 08:29:41 +00:00
onoe 0dbbd8cec4 implement new signal syscalls in FreeBSD 4.0-RELEASE, using native syscalls:
sigaction, sigprocmask, sigsuspend, and sigpending.
2000-07-18 14:15:05 +00:00
enami 9496825ae2 Define an auto variable ``cp'', which is used to scan the global variable
``version'', as const char * instead of char * to prevent compiler warning.
2000-07-17 04:04:02 +00:00
thorpej 9d069ade37 Sprinkle some const. 2000-07-14 18:26:46 +00:00
thorpej 195bf5c09f - Fix the likely cause of the "ps(1) hangs machine" problem. Always
vslock the user pages for the data being copied out to userspace,
  so that we won't sleep while holding a lock in case we need to
  fault the pages in.
- Sprinkle some const and ANSI'ify some things while here.
2000-07-14 07:21:21 +00:00
thorpej ba40fcada3 Sprinkle in some const. 2000-07-14 07:12:47 +00:00
thorpej 75159452f1 Sync w/ kern_time.c and sys_generic.c 2000-07-13 17:39:03 +00:00
thorpej c55e09bd44 Add a comment about the hzto() return value. 2000-07-13 17:32:06 +00:00
mrg d132b13d89 regen 2000-07-09 13:40:20 +00:00
mrg 8f9515257a - massive warning fix fest.
- fix pread/pwrite return values (plus some other syscalls that looked
  similarly broken).
- prototypes and clean up for netbsd32_ioctl.c

now getpw*() works under compat32!
2000-07-09 13:39:31 +00:00
mrg 18c0283349 look in /emul/netbsd32 for __stat13() and __lstat13(). 2000-07-09 03:03:35 +00:00
augustss 17ac2f03ee Implement OSS_GETVERSION.
Accept mixer values above max (100).
Handle the info from AUDIO_MIXER_DEVINFO properly, parts of it is opaque.
2000-07-04 09:56:14 +00:00
mrg c48063facd remove include of <vm/vm.h> 2000-06-29 02:40:37 +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
matt 3c173d4927 If we loaded an nmagic on a subpage boundary, adjust epp->ep_d{addr,size} so
that they start on a page boundary.  This is needed so that obreak(2) works
properly.
2000-06-28 00:14:44 +00:00
augustss 040884b5e6 Regen (no difference in generated files, but they were not up-to-date). 2000-06-27 20:59:23 +00:00
mrg f4e210fb2c remove redundant vm includes 2000-06-26 15:26:35 +00:00
mrg 89d0a3e519 remove redundant vm includes. 2000-06-26 14:38:50 +00:00
mrg 2f159a1bac remove/move more mach vm header files:
<vm/pglist.h> -> <uvm/uvm_pglist.h>
	<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
	<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
	<vm/vm_object.h> -> nothing
	<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
2000-06-26 14:20:25 +00:00
mrg c543a66253 remove some redundant <vm/vm_xxx.h> includes 2000-06-25 13:26:19 +00:00
matt 3a447126e3 simply the abutting text/data case. 2000-06-23 22:03:22 +00:00
matt a0cf752d0c For omagic & nmagic, add bss size into data magic (needed for brk to work
right).  Deal with the case that the data segment might fit into all the
trailing part of last text page.
2000-06-21 06:40:04 +00:00
matt 15511d1dcc Move COFF_LDPGSZ to ibcs2_machdep.h. Fix nmagic loader to deal with
subpage mappings.
2000-06-21 05:45:15 +00:00
matt aef5a7aa9a Allow dynamic twiddling of debug messages.
Fix printf problem when printing debug messages.
fix coff shlib loading.  Add a few sanity checks.
2000-06-16 01:56:36 +00:00
oki 37ebc7e168 Fix copyright notice. This file is derived from
compat/ibcs2/ibcs2_exec.c, keep the copyright notice.
2000-06-15 15:37:05 +00:00
veego 92c3e3856b Fix a comment. 2000-06-11 09:21:16 +00:00
veego 589a5222ec Remove the pcvt support. 2000-06-11 09:19:27 +00:00
oki 41608c00a3 PE/COFF (Win32) compatible binary support (experimental).
It currentry supports only i386.
2000-06-09 22:38:56 +00:00
soren a9aa2abf94 defopt SYSCALL_DEBUG. 2000-06-06 18:52:30 +00:00
soren 7a3db3e7fe Wrap line. 2000-06-06 18:07:33 +00:00
mycroft a7c27cd3af Nothing yet. 2000-06-04 16:29:25 +00:00
mycroft e9deffe0bf Move a bunch of the COFF definitions into exec_coff.h, so they can be used by
other code.   XXX Not tested on SH3 yet.
2000-06-04 16:23:59 +00:00
simonb 38cc1b3975 Add new sysctl node "KERN_SYSVIPC_INFO" with "KERN_SYSVIPC_MSG_INFO",
"KERN_SYSVIPC_SEM_INFO" and "KERN_SYSVIPC_SHM_INFO" to return the
info and data structures for the relevent SysV IPC types.  The return
structures use fixed-size types and should be compat32 safe.  All
user-visible changes are protected with
	#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)

Make all variable declarations extern in msg.h, sem.h and shm.h and
add relevent variable declarations to sysv_*.c and remove unneeded
header files from those .c files.

Make compat14 SysV IPC conversion functions and sysctl_file() static.

Change the data pointer to "void *" in sysctl_clockrate(),
sysctl_ntptime(), sysctl_file() and sysctl_doeproc().
2000-06-02 15:53:03 +00:00
eeh 7a92eda021 Include "opt_DDB.h" to enable the DDB sysctls. 2000-05-30 20:54:26 +00:00
thorpej e03e9e8086 Rather than starting init and creating kthreads by forking and then
doing a cpu_set_kpc(), just pass the entry point and argument all
the way down the fork path starting with fork1().  In order to
avoid special-casing the normal fork in every cpu_fork(), MI code
passes down child_return() and the child process pointer explicitly.

This fixes a race condition on multiprocessor systems; a CPU could
grab the newly created processes (which has been placed on a run queue)
before cpu_set_kpc() would be performed.
2000-05-28 05:48:59 +00:00
thorpej 21fc65e1a8 sleep() -> tsleep() 2000-05-27 04:52:27 +00:00
sommerfeld 40339b39f9 Reduce use of curproc in several places:
- Change ktrace interface to pass in the current process, rather than
p->p_tracep, since the various ktr* function need curproc anyway.

 - Add curproc as a parameter to mi_switch() since all callers had it
handy anyway.

 - Add a second proc argument for inferior() since callers all had
curproc handy.

Also, miscellaneous cleanups in ktrace:

 - ktrace now always uses file-based, rather than vnode-based I/O
(simplifies, increases type safety); eliminate KTRFLAG_FD & KTRFAC_FD.
Do non-blocking I/O, and yield a finite number of times when receiving
EWOULDBLOCK before giving up.

 - move code duplicated between sys_fktrace and sys_ktrace into ktrace_common.

 - simplify interface to ktrwrite()
2000-05-27 00:40:29 +00:00
tv 01780e8115 Add names for many syscalls not yet implemented, including those in
FreeBSD 4.0-RELEASE.  Also implement the following using existing NetBSD
syscalls:  pread, pwrite, getsid, mlockall, munlockall, __getcwd.
2000-05-23 16:05:51 +00:00
jhawk 78732e454b Remove conditionization upon XSERVER -- all the code
so conditionalized is already conditionalized on (NWSDISPLAY > 0),
so is wscons-specific. wscons has no conditionalization on XSERVER;
neither should the linux compatibility code.

Removing this is necessary to keep linux X server emulation functionining
after GENERIC rev 1.337 removing "options XSERVER" (relegating it
to the pccons/pcvt-specific, and therefore depricated).
2000-05-15 01:12:07 +00:00
kristerw 020e448c4b Regen 2000-05-04 21:56:47 +00:00
kristerw c60bd75960 Added lchflags and issetugid 2000-05-04 21:52:32 +00:00
thorpej 33e0776eda Remove junk after #undef. 2000-05-03 21:41:43 +00:00
simonb 3c359c262d The size of the members of struct ultrix_utsname were nothing like
reality - adjust and fill in "version" the same way that some other
compat routines do.  An Ultrix "uname -a" returns something meaninful
now instead of just "NetBSD     ".
2000-04-28 12:52:52 +00:00
minoura 48145d0463 Regen. 2000-04-21 16:18:54 +00:00
minoura 58c5fb660b We have now native issetugid. 2000-04-21 16:18:16 +00:00
christos e3004f2598 make this compile with -DDEBUG_SVR4 [lossage because sizeof is u_long now] 2000-04-12 15:12:13 +00:00
christos aca4545896 Markus Kilbinger <kilbi@rad.rwth-aachen.de>, reported that https: does not work.
The reason is that netscape tries to do stream operations on a plain file. So
we avoid that...
2000-04-12 02:46:41 +00:00
chs 45c43091fb add a cast for clarity. 2000-04-11 05:26:27 +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
chs ef20427f07 sparc -> __sparc__ 2000-04-10 01:22:44 +00:00
christos e6baf1c570 Follow the unused convention. 2000-04-09 22:40:11 +00:00
mrg 5e32788ad7 regen 2000-04-09 06:49:16 +00:00
mrg a20d930808 rename some unimplimented (because they are OLD in sunos) syscalls to avoid confusion. 2000-04-09 06:47:39 +00:00
christos 93f27a1a74 Print the extra bits in the SS_ flags. Somehow lwp uses 0x6f00000b0. What is
0x6fxxxxxx. Inquiring minds would like to know :-) It does not appear to be
documented.
2000-04-09 06:28:28 +00:00
christos 9813882e34 Add new sysconfig bits.
Fix the bogus numbering of the old bits.
2000-04-09 05:33:04 +00:00
christos a8d9661557 Try to do something more reasonable in the ASLWP case. Unfortunately
we don't support the semantics needed.
2000-04-09 05:30:17 +00:00
christos 926a3cecf8 print the extra SA_ bits we don't support. 2000-04-09 05:29:28 +00:00
soren e48983aa08 Add some IRIX constants. 2000-04-09 01:09:59 +00:00
chs f1196b666f change "ifdef sparc" to "ifdef __sparc__".
this fixes solaris shared libraries.
2000-04-07 07:02:11 +00:00
augustss a82aeb5508 Kill register declarations. 2000-03-30 11:24:16 +00:00
simonb 9ff7681a33 Don't need to include <sys/conf.h> here. 2000-03-29 03:43:31 +00:00
simonb 2f1fef39b3 Centralise the declarations of cpu_model, machine, machine_arch,
osrelease, and ostype and remove "extern char foo[];" (for hostname
and domainname too).

Also delete redunctant decl of boottime in kern_info_43.c.
2000-03-28 23:57:24 +00:00
kleink 230876cf26 Merge parts of chs-ubc2 into the trunk:
* Remove the casts to vaddr_t from the round_page() and trunc_page() macros to
  make them type-generic, which is necessary i.e. to operate on file offsets
  without truncating them.
* In due course, cast pointer arguments to these macros to an appropriate
  integral type (paddr_t, vaddr_t).

Originally done by Chuck Silvers, updated by myself.
2000-03-26 20:42:21 +00:00
frueauf 253924ee60 Fix typo: hxto -> hzto. 2000-03-25 20:23:05 +00:00
thorpej 7b918b4088 New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
  resource allocation.
- Insertion and removal of callouts is constant time, important as
  this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
2000-03-23 06:40:33 +00:00
thorpej dabbfde70a Implement fdremove() which is used in place of all the code that
did the "fdp->fd_ofiles[fd] = 0" assignment; fdremove() make sure
the fd_freefiles hints stay in sync.

From OpenBSD.
2000-03-23 05:16:12 +00:00
erh 24d8dabec4 Regen. 2000-03-20 00:50:45 +00:00
erh c21d536f5d sys_clone isn't MD on linux. 2000-03-20 00:50:14 +00:00
erh 1d34297aae Regen. 2000-03-18 23:53:38 +00:00
erh 38cf426930 Fix the msgrcv prototype. 2000-03-18 23:53:24 +00:00
erh 0174e6759b Add sigset_t parameter to restore_sigcontext, created by the sigreturn functions. linux_sigreturn still needs to use frame->extramask.
In setup_linux_rt_sigframe copy the signal mask to both possible locations.
2000-03-18 23:45:41 +00:00
erh 224f92b651 Pass a signal mask to restore_sigcontext. 2000-03-18 23:40:56 +00:00
erh c7a82169cc Regen. 2000-03-18 22:46:53 +00:00
erh 2648835399 Use the new linux_sys_reboot and linux_sys_connect. 2000-03-18 22:46:27 +00:00
erh 9db5981a04 Add linux_sys_reboot. 2000-03-18 22:23:13 +00:00
erh 528f8305be Regen. 2000-03-18 22:21:02 +00:00
erh f3ae1c7294 Use linux_sys_reboot instead of sys_reboot. 2000-03-18 22:20:57 +00:00
erh 035c694c67 Regen. 2000-03-18 22:16:56 +00:00
erh dd9cf0df56 Use linux_sys_reboot instead of sys_reboot. 2000-03-18 22:16:46 +00:00
erh 34b72dcf4a Add defines for linux_sys_reboot. 2000-03-18 22:01:02 +00:00
erh a159733250 Regen. 2000-03-18 20:44:01 +00:00
erh 50ef430f08 resync NOARGS lines with their definitions in kern/syscalls.master. resync STD lines with what is expected in .c files. (especially wrt adding const). Add missing prototype for setfsuid. Fix ptrace prototype. 2000-03-18 20:43:33 +00:00
erh fa21d7879c Adjust linux_sys_ptrace_args to reflect inconsistencies across ports. Temporarily ifndef alpha around getfsuid since Linux/alpha doesn't seem to have it. 2000-03-18 20:42:14 +00:00
soren 95054da1a1 Fix doubled 'the's in comments. 2000-03-13 23:52:25 +00:00
matt efc9b37ead expunge vm_offset_t/vm_size_t 2000-03-04 07:28:44 +00:00
matt 74ca33774a only include i386/include/reg.h on i386. 2000-02-27 17:30:10 +00:00
abs 7ff31fc326 Update patch from Witold Wnuk in PR 9335 to solve potential security
issue noted by tls.
2000-02-17 12:34:26 +00:00
eeh cde9dba8ab Add support for -current's ELF32 exec format. 2000-02-06 16:45:56 +00:00
abs 052fdc75bc regen 2000-02-03 10:22:34 +00:00
abs 89c5ba9f00 Add Linux fsuid system calls - from Witold J. Wnuk in PR kern/9335 2000-02-03 10:02:59 +00:00
tsutsui 11c8f56d48 Revert STRIPPROG -> STRIP 2000-02-01 05:25:24 +00:00
christos 3cb8a24438 Regen 2000-01-31 16:41:20 +00:00
christos 7ccc44e6f7 __semctl13 -> ____semctl13 2000-01-31 15:59:58 +00:00
christos 72ff1dee2f Regen 2000-01-31 15:53:46 +00:00
christos 44b3655e9d __semctl13 -> ___semctl13 2000-01-31 15:53:01 +00:00
tsutsui e61f177ab1 STRIP -> STRIPPROG 2000-01-19 16:29:54 +00:00
matt 897c73a03a Fix wait case for VAX SVR3. 2000-01-13 06:33:29 +00:00
jdolecek 600be45ffc Improve emulation of SIOCGIFHWADDR ioctl:
* when finding an interface, try the real name first before faking eth*
 * Linux kernel returns ENODEV if the request goes to unknown interface,
   so do the same here

This change makes Linux ICA client work.

Patch sent by Zdenek Salvet <salvet@ics.muni.cz> in kern/9169.
2000-01-12 17:19:11 +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
tron bfea30bc82 Regen. 2000-01-08 17:03:23 +00:00
tron 1433852cb6 Add missing system calls mlockall() and munlockall() as suggested by
Michael Eriksson in PR kern/9147.
2000-01-08 17:02:46 +00:00
eeh a7474fcab6 netbsd32_close() would work better if it called sys_close() rather than
sys_write().
netbsd32_getfsstat() cannot just copyin()/copyout(), convert the structures,
and call sys_getffstat().  sys_getffstat() wants to do its own
copyin()/copyout().  So we need to implent the whole of sys_getffstat()
in netbsd32_getfsstat().
1999-12-31 22:26:21 +00:00
eeh a65e57bfc6 Update to 32-bit compatibility routines. 1999-12-30 15:40:45 +00:00
tron 885afa5fce Regen. 1999-12-16 15:13:41 +00:00
tron 764eda2f33 Add ptrace(2). 1999-12-16 15:13:01 +00:00
tron 62397f55ef Add support for reading and writing non FPU register with ptrace(2). 1999-12-16 15:11:19 +00:00
tron 4aec38a7db Move MI parts of ptrace(2) emulation to "linux_misc.c". 1999-12-16 15:09:49 +00:00
tron f5dfa6e4a0 Support a few more request types in ptrace(2) emulation. 1999-12-12 01:30:49 +00:00
tron df8ccb921c Regen. 1999-12-12 00:00:42 +00:00
tron 0f4ddbec23 Incomplete but already working emulation of Linux's ptrace(2) for i386. 1999-12-12 00:00:16 +00:00
tron c3ce0bc384 Architecture independent definitions for Linux's ptrace(2) system call. 1999-12-11 23:57:48 +00:00
tron d5ed9dc998 Regen. 1999-12-05 21:26:36 +00:00
tron c65011886d Fix incorrect system call number. 1999-12-05 21:25:36 +00:00
tron ea2517e20d Add proper stub code to make emulation of Linux's pread(2) and pwrite(2)
work. Fixes PR kern/8945 by Dave Sainty.
1999-12-05 21:24:28 +00:00
tron 9b847640c3 Add bound checks in emulation of kill(2). This fixes the last part of
PR kern/8904 by Dave Sainty.
1999-12-04 22:26:52 +00:00
tron 96fdbb96a8 Add bound checks in emulation of sigaction(2). This fixes a part of
PR kern/8904 by Dave Sainty.
1999-12-04 22:21:12 +00:00
tron 60e5eb1dd2 Fix typo in last commit. 1999-12-04 22:17:43 +00:00
tron f8a4b15b1c Adapt to renamed system call argument. 1999-12-04 22:15:57 +00:00
tron a3dbb6bba5 Regen. 1999-12-04 22:14:52 +00:00
tron 8b5f9298fa Consistently call signal number arguments "signum". 1999-12-04 22:14:14 +00:00
tron f8df357a47 Add bound checks in emulation of signal(2) and return SIG_ERR on failure.
This fixes a part of PR kern/8904 by Dave Sainty.
1999-12-04 22:08:36 +00:00
tron 5bc798bb82 Allow signal numbers upto 63 in clone(2) emulation. 1999-12-04 21:58:05 +00:00
tron 9bf4ab219a Correct signal array size. 1999-12-04 21:41:53 +00:00
tron cd4ab88255 Extend signal mapping array to 64 entries like in the i386 emulation. 1999-12-04 21:38:57 +00:00
matt 9fcf201409 Make this compile again on sparc. 1999-11-28 18:06:46 +00:00
augustss 83c33f4fee Fix typo in comment. From Brad <brad@openbsd.org> 1999-11-19 23:50:21 +00:00
augustss d37a1f8e3b Implement OSS_SOUND_MIXER_INFO. 1999-11-17 00:06:38 +00:00
thorpej 2859f66b8f Add register prefixes. 1999-11-11 01:27:59 +00:00
erh 5779957787 undo confusion. 1999-11-02 08:02:43 +00:00
mycroft e45ef6abcd Emulate the Linux DVD_* ioctls(2). This gets us 90% of the way to running the
LiViD DVD player.  (See forthcoming mail to current-users.)
XXX NOTE: We should do something to probe capabilities, rather than allowing
these ioctls on any device.
1999-10-29 15:02:56 +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
itohy a833d94864 Add #include <machine/cpu.h> for need_resched() macro. 1999-10-21 23:24:08 +00:00
eeh 1f45477db9 Add netbsd32_compat_14.c
Rename everything from compat_netbsd32 -> netbsd32 so we don't have silly
names like compat_14_compat_netbsd32_sys_shmctl().
1999-10-11 01:36:21 +00:00
thorpej 09e277b357 Fix typos in the license notice. 1999-10-11 01:18:35 +00:00
tron 4d4888a7cb After linux_sys_clone() has been moved to "linux_sched.c" we don't need
to include "linux_sched.h" any more.
1999-10-05 09:22:04 +00:00
fvdl 6c6e28d62b Handle the newer, larger sigset_t Linux now uses. 1999-10-04 17:46:37 +00:00
tron 684ef7f4c2 Add emulation for scheduler related syscalls. Although they are dummies
even under Linux the posix thread library for "glibc2" requires them.
1999-10-04 16:58:15 +00:00
tron c81bdfafa8 Regen from "syscalls.master". 1999-10-04 16:57:10 +00:00
tron 9b451861b9 Add emulation for scheduler related syscalls. Although they are dummies
even under Linux the posix thread library for "glibc2" requires them.
1999-10-04 16:55:54 +00:00
tron 0b48cdd9f8 NetBSD's signal number 11 is SIGSYS nog SIGSEGV. 1999-09-30 19:32:53 +00:00
bouyer 52497e180a Remplace kern.shortcorename sysctl with a more flexible sheme,
core filename format, which allow to change the name of the core dump,
and to relocate it in a directory. Credits to Bill Sommerfeld for giving me
the idea :)
The default core filename format can be changed by options DEFCORENAME and/or
kern.defcorename
Create a new sysctl tree, proc, which holds per-process values (for now
the corename format, and resources limits). Process is designed by its pid
at the second level name. These values are inherited on fork, and the corename
fomat is reset to defcorename on suid/sgid exec.
Create a p_sugid() function, to take appropriate actions on suid/sgid
exec (for now set the P_SUGID flag and reset the per-proc corename).
Adjust dosetrlimit() to allow changing limits of one proc by another, with
credential controls.
1999-09-28 14:47:00 +00:00
christos 75d8e5904a Regen 1999-09-16 18:19:11 +00:00
christos 36140f8037 fix olseek botch 1999-09-16 18:18:28 +00:00
chs f3a668ed84 eliminate the PMAP_NEW option by making it required for all ports.
ports which previously had no support for PMAP_NEW now implement
the pmap_k* interfaces as wrappers around the non-k versions.
1999-09-12 01:16:55 +00:00
jdolecek cfa9258f85 Use DEBUG_LINUX exclusively. Fixes PR#7684. 1999-09-08 16:52:08 +00:00
christos d205cc9cd4 oops, forgot to include new files. 1999-09-07 18:20:18 +00:00
christos ffdf7a5fe8 regen 1999-09-07 06:25:14 +00:00
christos c7897366b5 preliminary lwp support; currently staroffice breaks because set_ldt emulation
is borken, not because of threads problems.
1999-09-07 06:24:56 +00:00
thorpej 2c358fca82 Update for new msgctl()/semctl()/shmctl() calls. 1999-08-25 04:52:06 +00:00
thorpej 03a42efc4b Regen. 1999-08-25 04:51:06 +00:00
thorpej 0dc5bd44d5 Update for new SVID IPC calls, and also update the list of syscalls
to include the complete set as of 9.x.
1999-08-25 04:50:53 +00:00
thorpej 0d32655143 Completely rewrite the HP-UX SVID IPC compat calls. 1999-08-25 04:50:08 +00:00
thorpej c1f3fb3299 Regen. 1999-08-25 04:48:48 +00:00
thorpej 710fa26673 Update for new msgctl()/semctl()/shmctl(). 1999-08-25 04:48:21 +00:00
thorpej 9244fc5b3e Add compatibility calls for the 1.4 System V IPC *ctl() calls, and
update the 1.0 compat calls.
1999-08-25 04:47:12 +00:00
thorpej ed1f903927 Regen. 1999-08-25 04:45:43 +00:00
thorpej 943b6fe91f Update for new msgctl()/semctl()/shmctl(), and add fhopen(), fhstat(),
and fhstatfs().
1999-08-25 04:45:24 +00:00
thorpej d30f8c710b Erg, fix a typo that snuck in there. 1999-08-23 20:59:33 +00:00
thorpej 0693721b59 A more-or-less complete list of the types used in HP-UX 9.x hp9000s300. 1999-08-23 18:40:43 +00:00
kleink 79ce98b212 Per discussion with Lennart Augustsson, change the behaviour to report emulated
encodings, too.  (This is currently an issue with the eso(4) driver, which,
due to different byte orders in playing and recording directions, sets the
emulated flag for all 16-bit encodings, although it could be argued that this
is an unfortunate weakness of the query_encoding() interface.)
1999-08-22 13:43:09 +00:00
kleink a6a1795f0e Nuke a comment of mine (obsoleted by previous revision). 1999-08-22 13:11:38 +00:00
tron 14cc7c79c1 Regen. 1999-08-16 19:13:29 +00:00
tron 327a8cdf75 Add stime() to syscalls table. 1999-08-16 19:13:01 +00:00
tron c3ea560498 Add emulation for Linux stime(2) required for MuPAD's X11 interface. 1999-08-16 19:06:29 +00:00
simonb 299578ebd5 Spell "privilege" correctly (correct spelling from Jonathan Stone). 1999-08-16 02:59:22 +00:00
thorpej eb20bbc780 Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied.  Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX.  This platforms still have this bug until their
XXX spl*() functions are fixed.
1999-08-05 18:08:08 +00:00
wrstuden 3bf14d81e9 Add support for fcntl(2) to generate VOP_FCNTL calls. Any fcntl
call with F_FSCTL set and F_SETFL calls generate calls to a new
fileop fo_fcntl. Add genfs_fcntl() and soo_fcntl() which return 0
for F_SETFL and EOPNOTSUPP otherwise. Have all leaf filesystems
use genfs_fcntl().

Reviewed by: thorpej
Tested by: wrstuden
1999-08-03 20:19:16 +00:00
christos 2f73c9bc1d sparc is not defined anymore... Use __sparc__ and __i386__. Also default
to the standard elf NOADDR...
1999-08-01 23:55:40 +00:00
drochner 44b56d917e regen 1999-07-30 16:04:41 +00:00
drochner 287f2ffe69 emulate fcntl(F_SETLK) & Co.
(seti@home works now:-)
1999-07-30 16:03:49 +00:00
rh cfa2c0bd79 Remove superfluous NULL argument from proclist_lock_read() call. 1999-07-25 08:55:46 +00:00
thorpej 01a8cffe77 Add a read/write lock to the proclists and PID hash table. Use the
write lock when doing PID allocation, and during the process exit path.
Use a read lock every where else, including within schedcpu() (interrupt
context).  Note that holding the write lock implies blocking schedcpu()
from running (blocks softclock).

PID allocation is now MP-safe.

Note this actually fixes a bug on single processor systems that was probably
extremely difficult to tickle; it was possible that schedcpu() would run
off a bad pointer if the right clock interrupt happened to come in the
middle of a LIST_INSERT_HEAD() or LIST_REMOVE() to/from allproc.
1999-07-22 21:08:30 +00:00
thorpej 32e1fd0d03 Move the call of cpu_wait() out of the wait4() functions, and into the
body of reaper(), right before the call to uvm_exit().  cpu_wait() must
be done before uvm_exit() because the resources it frees might be located
in the PCB.
1999-07-20 21:54:05 +00:00
jtk 92bf84ec68 implement emulation of SIOCGIFHWADDR, PR 7997 1999-07-17 22:03:55 +00:00
jtk c13299119a add LINUX_SIOCGIFHWADDR 1999-07-17 21:46:28 +00:00
thorpej c581bf97c5 A few things to make the Linux clone(2) emulation work a bit better:
- When the exit signal is specified to be 0, don't just assume they
  meant SIGCHLD.  In the Linux world, this appears to mean "don't deliver
  an exit signal at all".
- Simplify P_EXITSIG(); don't check against initproc here, just change
  the exit signal to SIGCHLD if reparenting to initproc.

A very simple clone(2) test program now works, and the MpegTV package
starts, but doesn't run properly yet (I believe there is a separate
bug which keeps it from working properly).
1999-07-15 23:18:41 +00:00
kleink dfa5aad003 Regen. 1999-07-12 22:04:00 +00:00
kleink e79a283e47 XSH5: change function signature to `void *sbrk(intptr_t)'. 1999-07-12 21:55:19 +00:00
cgd 2055d9d08d emulate (parts of) flock 1999-06-26 01:24:41 +00:00
cgd 1e29f2fb1f convert flock struct 1999-06-26 01:23:23 +00:00
cgd b9c997eba9 flock struct and related constants and types 1999-06-26 01:21:30 +00:00
thorpej 12347b2657 Make uvm_vslock() return the error code from uvm_fault_wire(). All places
which use uvm_vslock() should now test the return value.  If it's not
KERN_SUCCESS, wiring the pages failed, so the operation which is using
uvm_vslock() should error out.

XXX We currently just EFAULT a failed uvm_vslock().  We may want to do
more about translating error codes in the future.
1999-06-17 15:47:22 +00:00
oster f4628e2fda FILE_UNUSE needs two args, not one. 1999-06-13 21:34:32 +00:00
drochner 6e2b65ec1d regen 1999-06-09 12:38:50 +00:00
drochner b4e4c530db add "sys_" prefix to LFS syscalls 1999-06-09 12:33:18 +00:00
christos 354ba222e6 Regen 1999-06-09 04:50:32 +00:00
christos b7a0cd53a2 Propagate kern changes 1999-06-09 04:50:10 +00:00
christos 4ebea99d8e Regen 1999-06-09 04:28:24 +00:00
christos 1e6c35821b propagate changes from kern 1999-06-09 04:27:44 +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
pk bd84136493 copyinst() takes a `size_t *'. 1999-05-27 14:03:05 +00:00
tron c0567a6bc7 Add support for SETALL and GETALL to the Linux emulation of semctl()
and improve handling of SETVAL. Patches supplied by YAMAMOTO Jiro in
PR kern/7621.
1999-05-27 13:30:40 +00:00
thorpej 497248ca55 XXX Pass VM_PROT_NONE to uvm_vslock() as access_type. Why are we even
vslocking here?!  copyout() on its own seems to suffice just about everwhere
else, and it's not like the process is going to exit; it's in a system
call!
1999-05-26 01:07:06 +00:00
thorpej a2dc12021c Oops, completely forgot to translate the exit signal in clone(2). 1999-05-17 19:26:33 +00:00
thorpej 0f74e48ca5 Emulate the Linux {get,set}resgid(2) system calls. 1999-05-14 18:45:31 +00:00
thorpej 8a61761cc5 Emulate the Linux {get,set}resuid(2) system calls. 1999-05-14 18:44:50 +00:00
thorpej dd623ce325 Regen. 1999-05-14 18:44:15 +00:00
thorpej a03622b33f Emulate the Linux vfork(2) (which is like NetBSD's __vfork14(2)),
{get,set}resuid(2), and {get,set}resgid(2).  Note a few more system
calls that we don't yet emulate.
1999-05-14 18:43:58 +00:00
thorpej 5f1b28961e Regen. 1999-05-14 18:43:20 +00:00
thorpej e0a6808cef Emulate the Linux vfork(2) (which is like NetBSD's __vfork14(2)),
{get,set}resuid(2), and {get,set}resgid(2).  Note a few more system
calls that we don't yet emulate.
1999-05-14 18:43:01 +00:00
thorpej 64d90992b4 Regen. 1999-05-14 18:41:20 +00:00
thorpej ba8fcafa16 Emulate the Linux vfork(2) (which is like OSF/1 vfork(2) and NetBSD's
__vfork14(2)) and {get,set}resuid(2).  Linux does not have {get,set}resgid(2)
on their Alpha port!
1999-05-14 18:39:38 +00:00
thorpej 087adcea52 Regen. 1999-05-13 23:43:15 +00:00
thorpej fa1c5fed1a Emulate the Linux clone(2) system call. 1999-05-13 23:42:34 +00:00
thorpej 053ec76d86 Fully emulate the Linux wait4(2) system call, including the __WCLONE
flag (which is equivalent to our new WALTSIG).
1999-05-13 01:00:50 +00:00
thorpej 5512f35a12 Define the flags used by the Linux wait4() system call. 1999-05-13 00:31:57 +00:00
thorpej e2c674e2c6 Add scheduling-related definitions. Currently we have the flags passed
to the __clone(2) system call.
1999-05-12 19:49:09 +00:00
cgd c283289b46 For lack of a bit, the letter was lost. For lack of the letter, the
macro was lost.  For lack of the macro, the function was lost.  For lack
of the function, the syscall was lost.  For lack of the syscall, the
application was lost.  For lack of the application, my time was lost.
1999-05-10 21:41:07 +00:00
cgd 9ee892559b regen 1999-05-10 06:00:10 +00:00
cgd 798cd0a332 start at (new) sendmsg and recvmsg. right now, the former doesn't
handle control messages and the latter is just a stub.
1999-05-10 05:58:44 +00:00
cgd 55c7aec3cc rename xopen-ish iovec and msghdr structs 1999-05-10 04:18:22 +00:00
cgd 21c7b563a8 msghdr and x/open iovec structs 1999-05-10 03:58:50 +00:00
cgd 99cc65e9ba regen 1999-05-10 03:34:20 +00:00
cgd 4bf16b94f4 old accept -> compat_43_sys_accept 1999-05-10 03:33:04 +00:00
cgd bf29d6c987 regen 1999-05-10 03:00:27 +00:00
cgd 1c05179cd4 usleep_thread: round ticks up, don't sleep forever, use better wchan 1999-05-10 02:55:57 +00:00
cgd 1e2f18cb6a listen is the same as native 1999-05-10 02:54:57 +00:00
cgd f7c70eaf0e regen 1999-05-10 01:59:41 +00:00
cgd 726fed408a plink, plink.... socketpair! 1999-05-10 01:58:37 +00:00
kleink fe0ce0cd42 Need to explicitly include <machine/cpu.h> for a cpu_wait() macro definition. 1999-05-08 01:23:01 +00:00
drochner 192b3c733c Build libraries for kernel/standalone code from within their compilation
directories and use .PATH to lookup the source files.
(Formerly, the libs were built from the source dirs, with MAKEOBJDIR
set to the compilation directory.)
This solves 2 problems:
-"mkdep" and "make" are now consistent about the file lookup, this fixes
 bad interactions with amd reported in PR bin/7374 (Arne Juul) and
 lossage reported by Andrew Gillham ("obj" dirs and relative paths still
 don't work well together)
-kernel compile trees can be moved around without forcing a new
 "make depend" - fixing PR kern/4021 by Martin Husemann
1999-05-07 14:28:50 +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 3b5a8a7db7 shuffle (sort) 1999-05-05 01:51:31 +00:00
cgd 5e1a5ebf21 clean up sigset_t manipulation macros 1999-05-05 00:57:43 +00:00
cgd ceff265279 shuffle (alphabetize) 1999-05-05 00:48:30 +00:00
cgd ff38fb6396 regen 1999-05-04 05:23:05 +00:00
cgd e7f2a6f938 stub classcntl(). for now, it returns ENOSYS. (a stub for classcntl()
was suggested by Anders Magnusson <ragge@ludd.luth.se>.)
1999-05-04 05:17:22 +00:00
cgd e24a4116bc add a few XXXs 1999-05-04 05:11:03 +00:00
cgd debeb21304 regen 1999-05-04 05:00:21 +00:00
cgd ab7cdebda6 emulate shm*(), but only so far as to return ENOSYS for now (until
they're really needed).  put them in their own file because when we
need to emulate them, they'll need a bunch of code.
1999-05-04 04:59:21 +00:00
cgd 2165378111 add a 'clean' target to nuke files built from syscalls.master, so that
it's easier to commit non-generated files all at once.
1999-05-04 04:56:44 +00:00
cgd d0937ee8b6 don't pull in osf1_syscall.h 1999-05-04 02:45:35 +00:00
cgd 15e8e0d207 IPC key_t 1999-05-04 02:44:43 +00:00
cgd 759a1e3cd7 regen 1999-05-04 02:12:33 +00:00
cgd bd7a54454d pathconf/fpathconf 1999-05-04 02:12:15 +00:00
cgd a0a7b0de30 protection-related bits -> osf1_prot.c 1999-05-01 05:49:01 +00:00
cgd ca7738a519 clean up ordering, add a comment or two 1999-05-01 05:43:52 +00:00
cgd 12df8bf0da {get,set}rlimit, getrusage -> osf1_resource.c 1999-05-01 05:41:56 +00:00
cgd 8d9e0684d2 descriptor-frobbing syscalls (fstat, fcntl(), lseek(), etc.) ->
osf1_descrip.c.
1999-05-01 05:34:59 +00:00
cgd 39ba96ee96 utimes() belongs here 1999-05-01 05:33:36 +00:00
cgd 789e810c20 get/settimeofday, interval timers -> osf1_time.c 1999-05-01 05:25:37 +00:00
cgd bf9d06e035 typical filename using syscalls (open(), access(), execve(), etc.) -> osf1_file.c 1999-05-01 05:18:01 +00:00
cgd deeb289def sys_generic-ish bits move to osf1_generic.c 1999-05-01 05:06:46 +00:00
cgd f493e92106 clean up vm-related headers 1999-05-01 04:59:42 +00:00
cgd d3b6da7da3 and the socket calls move 1999-05-01 04:57:15 +00:00
cgd ffc61cf092 shuffle some conversion bits around that were missed earlier 1999-05-01 04:47:00 +00:00
cgd 9cc30ed036 needs mount.h 1999-05-01 04:38:39 +00:00
cgd 2d25ceb2d2 pull in compat_util.h 1999-05-01 04:38:20 +00:00
cgd e42f7d331f move mmap() and related functions into their own file 1999-05-01 04:34:20 +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 38da682259 Moved to osf1_cvt_errno.c,v 1999-05-01 02:16:01 +00:00
cgd 333154d794 Moved from osf1_errno.c,v 1999-05-01 02:16:00 +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
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 5a93f3c9b1 emulate wait4(), put some guts into sysinfo(), and redo fcntl()
F_{GET,SET}FL emulation.
1999-04-30 05:25:34 +00:00
cgd 28410181b2 return error if unsupported sigaltstack flags used 1999-04-30 05:24:04 +00:00
cgd a928d381b2 regen 1999-04-30 04:36:04 +00:00
cgd d2d8e961fe emulate wait4, clean up sigreturn args, emulate {get,set}domainname 1999-04-30 04:33:51 +00:00
cgd e836b093b4 nuke most fcntl() F* flags, and note that O_* should be used instead. 1999-04-30 04:31:45 +00:00
cgd c21c5d0c2d systeminfo.h SI_* constants, wait.h W{NOHANG,UNTRACED}, plus spacing cleanup 1999-04-30 02:12:03 +00:00
cgd afe914207b we can actually setitimer() now 1999-04-30 01:57:27 +00:00
cgd 94a4e36ed2 use osf1-specific sigcode 1999-04-30 01:46:09 +00:00
cgd 6abb3f7b37 regen 1999-04-29 23:39:55 +00:00
cgd 59c243a0b7 emulate setitimer(), but for now just return EINVAL. stub sysinfo() (XXX). 1999-04-29 23:37:23 +00:00
cgd e9bc2c7ae3 need to emulate setitimer and sysinfo 1999-04-29 22:08:49 +00:00
cgd 2b9f4ca12d in NetBSD, top 32 bits of ioctl com are always 0 1999-04-29 17:34:49 +00:00
thorpej 0792acce0d Regen. 1999-04-29 17:20:37 +00:00
thorpej fb1f070eba Add entry for set_program_attributes(). 1999-04-29 17:19:47 +00:00
thorpej 8ef6e2a635 Implement set_program_attributes(). 1999-04-29 17:18:59 +00:00
christos 4c1bb7794a Need sunos_sigcode and sunos_esigcode now that our sigreturn is
different.
1999-04-29 16:14:04 +00:00
christos a38ee86714 Make ss_size something reasonable (not 0) so sigaltstack does not fail.
Pull me up plz!
1999-04-29 16:09:12 +00:00
cgd a509481404 itimerval and related constants 1999-04-29 05:54:13 +00:00
cgd ee325de1bb regen for syscalls.master 1999-04-29 02:11:51 +00:00
cgd 1041a1c770 emulate access() and mprotect(), hook into COMPAT_43 get{peer,sock}name 1999-04-29 02:10:07 +00:00
cgd f4507cddca mprotect() and access() 1999-04-29 02:08:58 +00:00
cgd cc4f9f6afb access() flags 1999-04-29 02:06:50 +00:00
cgd 52b80ff167 fix some bugs (good to get to the point where bug-fixing is an issue!):
* when copying out the timezone in gettimeofday, don't accidentally copy
  out the timeval again (into the timezone buffer).
* mmap() PROT_WRITE and PROT_EXECUTE imply PROT_READ.
1999-04-28 06:01:51 +00:00
cgd 278f92716f regen for updated syscalls.master 1999-04-28 05:10:38 +00:00
cgd d3708a1699 more timeval-related lossage. fixed some fns, added settimeofday & utimes 1999-04-28 05:09:47 +00:00
cgd fc1142ac44 be more careful about getting the exec_name emul arg field 1999-04-28 02:49:38 +00:00
cgd a61beae31e regen for changed syscalls.master 1999-04-28 02:34:47 +00:00
cgd a9deaa593a emulate select(), to get the timeval right.
And CGD said, "Let there be eyes!"  And there were eyes, and it was good.
1999-04-28 02:34:25 +00:00
cgd 4c9a03c3b3 do easy 'f'-class ioctls 1999-04-28 02:16:07 +00:00
cgd 3cca776d42 regen for changed syscalls.master 1999-04-28 02:03:45 +00:00
cgd 28561f9679 can't use system gettimeofday, and need to implement uname 1999-04-28 02:03:13 +00:00
cgd 93e2cb1a1e uname, gettimeofday 1999-04-28 02:02:50 +00:00
cgd ccd0018aca uname and timezone structures, and some minor cleanup 1999-04-28 02:00:36 +00:00
cgd 6e5469dc42 implement osf1_sys_madvise() 1999-04-27 18:45:22 +00:00
cgd 3cb15b5b9b regen for changed syscalls.master 1999-04-27 18:41:37 +00:00
cgd df6ae494ef fix madvise args 1999-04-27 18:40:53 +00:00
cgd 99df19a561 madvise operation definitions 1999-04-27 18:38:07 +00:00
cgd 3d0c9ec2a8 kill a couple of debugging printfs i accidentally left in 1999-04-27 17:56:52 +00:00
cgd 8f40430549 regen for changed syscalls.master 1999-04-27 17:53:11 +00:00
cgd 6b9bb2a3cb fix getrusage args 1999-04-27 17:52:44 +00:00
cgd 009c460d25 emulate getrusage, add some XXXs 1999-04-27 17:50:59 +00:00
cgd 9a71b695bd osf1_timeval and osf1_rusage and related constants 1999-04-27 17:50:23 +00:00
cgd 44cbebec30 note that his should be shot from a cannon 1999-04-27 16:09:28 +00:00
cgd 1f9cfb5d53 update for current reality 1999-04-27 16:08:40 +00:00
christos b69c7692af From cgd again: pbuf == path on failure. 1999-04-27 15:42:37 +00:00
christos c4f1bab08e Make the usage consistant and document it:
if the path was given in a user buffer, return the new path in
a user buffer.
if the path was given in a kernel buffer, allocate a new kernel buffer
to return the new path; the caller is responsible for freeing the buffer
if we fail always set the new path to NULL.
This usage broke when I adde the /../ shortcut. Noted by cgd.
1999-04-27 11:36:47 +00:00
cgd f355b96b7a note that this document is now out of date 1999-04-27 06:39:49 +00:00
cgd 7e3ad9e963 evil hack to work around non-fixed mmap requests 1999-04-27 06:37:12 +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
cgd bd947212ac major(), minor(), and makedev() 1999-04-26 06:10:36 +00:00
cgd 9524149336 use fcntl() flags from osf1.h, map all of them 1999-04-26 05:57:53 +00:00
cgd 1904f78fb5 fcntl() flags 1999-04-26 05:56:34 +00:00
cgd 6d24aedc2c table-based translation of sigaction and sigaltstack flags 1999-04-26 05:35:08 +00:00
cgd 635a7843a1 copyright notice 1999-04-26 05:32:18 +00:00
cgd 6dbaac99f9 slight cleanup of spacing 1999-04-26 04:29:43 +00:00
cgd 35a22b65fc rlimit stuff 1999-04-26 03:30:48 +00:00
cgd 646c8f519a resource limit definitions 1999-04-26 03:29:05 +00:00
cgd 5d3c1d0c49 use osf1.h definitions and some table-based flag translation 1999-04-26 03:10:58 +00:00
cgd 32c9cd9866 exec and mount structs/defns, and some cleanup 1999-04-26 03:07:40 +00:00
cgd 445556f304 add a section of OSF/1 types, and add many more OSF/1 structures and
definitions.
1999-04-26 01:24:26 +00:00
cgd 1d0207c926 const-ify flags translation tables.
kill some cruft, and move various flags and structure definitions into
  osf1.h (not done yet).
Do a better job of translating fcntl(), and translate flags in sento()
  emulation.
1999-04-26 01:23:01 +00:00
cgd 196564f8e3 remove some structs and def'ns; they're moving to osf1.h 1999-04-26 01:22:18 +00:00
cgd 637226f0ad pull in osf1.h 1999-04-26 01:21:43 +00:00
cgd ad10b95967 translate EAGAIN/EWOULDBLOCK properly 1999-04-26 01:16:04 +00:00
simonb 8a8e8d144f Shut 'gcc -Wuninitialized' up. 1999-04-25 02:42:01 +00:00
eeh 96b63fc788 Don't defopt COMPAT_NETBSD32 here; it's done in sys/conf/files. 1999-04-24 19:17:33 +00:00
cgd 45a020863e substantial cleanup, including:
* do more flags conversions, using the table driven converter.
* check for alternate (emulation) path in lots more places.
1999-04-24 07:23:54 +00:00
cgd ed106195ea cleanup: kill syscall args comments 1999-04-24 07:13:23 +00:00
cgd d081124ca2 cleanup: nuke register 1999-04-24 07:09:49 +00:00
cgd d7c211e583 cleanup: kill syscall args comments 1999-04-24 07:06:35 +00:00
cgd dd4d52e331 slight hdr inclusion cleanup, get ioctl-related def'ns from osf1.h 1999-04-24 06:59:11 +00:00
cgd 8b1bcd5e9c pull in osf1.h, not osf1_errno.h 1999-04-24 06:58:26 +00:00
cgd 2fc0019c7a Collected OSF/1 definitions and structures, sorted by OSF/1 header.
Error numbers (errno.h) aren't here, since they're likely to change
(additions) more often.
1999-04-24 06:56:25 +00:00
cgd 5b217baeb1 implement a simple function, emul_flags_translate() to do table-based
flags translation.
1999-04-24 02:56:06 +00:00
cgd f023a00cd1 clean up multiple inclusion protection def'ns 1999-04-23 18:01:05 +00:00
cgd 1c19c07f42 clean up multiple inclusion protection def'ns and whitespace 1999-04-23 18:00:34 +00:00
cgd cc6809bffa regen for 'const poisoning for strings, and minor cleanup' 1999-04-23 06:20:33 +00:00
cgd c95f8f86c1 const poisoning for strings, and minor cleanup 1999-04-23 06:19:51 +00:00
cgd c470144d55 use the errno mapping array 1999-04-23 06:15:35 +00:00
cgd 8ca456cbb3 add osf1_errno.c 1999-04-23 06:07:55 +00:00
cgd f0f87c5554 finish updating this for signal changes, as was started in the
mis-labeled ("const poisoning"?!??!) rev 1.6.
1999-04-23 05:56:28 +00:00
cgd f33ddea5c4 add an OSF1_CHECK_ALT_CREAT, similar to OSF1_CHECK_ALT_EXIST 1999-04-23 05:55:13 +00:00
cgd 4a84f3545a OSF/1 errno definitions, and a NetBSD -> OSF/1 errno mapping table. 1999-04-23 05:37:41 +00:00
cgd f12f795592 a quick hack to make generating errno conversion tables from our and other
systems' headers a bit easier.  leaves much to be desired, but it's better
than nothing.
1999-04-23 05:31:33 +00:00
kleink ed74932033 Add COMPAT_SVR4 for m68k. 1999-04-19 21:22:56 +00:00
kleink 6a9c669828 Move linux_reenter_syscall() to a common location and rename it to
reenter_syscall() - it's going to be shared with COMPAT_SVR4 and soon be
used by native code.
1999-04-19 20:58:37 +00:00
mrg 7007bb40d6 fix errors in the copyright on this. 1999-04-14 02:50:38 +00:00
augustss 1ea49a1848 Make copyright conform. 1999-04-13 20:31:32 +00:00
tv 724f072dde Nuke my copyrights and/or assign them to TNF where appropriate. 1999-04-06 02:55:24 +00:00
drochner 74768f75f4 remove unneeded <vm/*> includes 1999-04-01 18:37:33 +00:00
tron ab9ea90a8e Regen. 1999-03-30 07:37:58 +00:00
tron b46e8732dd Add poll() emulation. 1999-03-30 07:29:05 +00:00
abs bb2d7dd6dc Regenerate (with poll()) 1999-03-30 02:25:32 +00:00
abs 9c2ef08c3e Since NetBSD has poll(), use it.
Linux oracle install now gets far enough that I want our DBA around to
see if we can finish the job.
1999-03-30 02:22:49 +00:00
wrstuden eb10774f2b Explicitly mask mode returned in old stat structure to 16 bits. Also correct
comment (we're converting from a new to an old struct stat).
1999-03-30 00:13:57 +00:00
sommerfe 3e341c9af5 sync with regular syscalls.master: Add getcwd, fchroot, and tweak __getlogin 1999-03-28 21:56:56 +00:00
tron 82f6a3397b Regen. 1999-03-27 01:15:58 +00:00
tron 5b98b641a8 Add emulation for Linux "getcwd" syscall. 1999-03-27 01:10:56 +00:00
eeh 69d1f9d0d3 COMPAT_SPARC32 -> COMPAT_NETBSD32 1999-03-26 04:29:20 +00:00
mrg 54ab2e1e54 clean and up make compile 1999-03-25 17:49:43 +00:00
mrg c3b0d25b27 SPARC32->NETBSD32 1999-03-25 16:58:39 +00:00