Commit Graph

1099 Commits

Author SHA1 Message Date
christos
5ae508513d - include <sys/wait.h> so that this compile
- use the code field directly, instead of redoing the logic.
- XXX: the status field must be wrong. I think that the _WSTATUS()
  should not be used directly.
2005-06-25 02:19:06 +00:00
manu
d83c516040 More accurate SIGCHLD code and status for siginfo 2005-06-24 22:57:05 +00:00
manu
c8b33aa328 report the right process status 2005-06-22 21:57:30 +00:00
manu
5e803980cd Fix siginfo to return the right child's status. 2005-06-22 20:20:30 +00:00
manu
6593739f61 Implent CLONE_PARENT_SETTID, CLONE_CHILD_CLEARTID, and CLONE_CHILD_SETTID
options to clone(). This makes fork() work on amd64.

clone() prototype has changed and the changes is probably revelant on some
other arches.
2005-06-22 15:10:51 +00:00
atatat
df13e3579e Change the rest of the sysctl subsystem to use const consistently.
The __UNCONST macro is now used only where necessary and the RW macros
are gone.  Most of the changes here are consumers of the
sysctl_createv(9) interface that now takes a pair of const pointers
which used not to be.
2005-06-20 02:49:18 +00:00
christos
6f86542bb2 remove duplicate declaration. 2005-06-19 23:46:32 +00:00
tsutsui
bce385b9f7 Add a const. 2005-06-02 16:54:52 +00:00
drochner
c2a5fd0191 more cast-qual fallout 2005-06-02 13:03:27 +00:00
christos
fb4b40b7e8 - sprinkle const.
- add XXXUNCONST to the emul_find() pbuf argument free'ing. XXX: this needs
  an api change.
- avoid variable shadowing.
2005-05-29 22:08:16 +00:00
jmc
36b625d324 Regen 2005-05-23 23:22:27 +00:00
jmc
55c161e3ff Add clock_* POSIX functions. 2005-05-23 23:21:49 +00:00
fvdl
57409f3466 sigreturn doesn't take arguments. Instead, find out where the signal
frame is from the stack pointer in the frame frame.

Also, don't forget to copy %rip back in.
2005-05-22 19:31:15 +00:00
fvdl
e83accc0f6 Regen after sigreturn argument change. 2005-05-22 19:29:40 +00:00
fvdl
8251c0b501 Change sigreturn to have no arguments. 2005-05-22 19:29:15 +00:00
fvdl
beae305307 Use a modified buildcontext function for Linux signals. It doesn't set
the unused segment registers, it just uses the already used values.
2005-05-22 14:52:12 +00:00
fvdl
33e2d79f47 Define linux_usertrap function, and set it in struct emul. For all
but amd64, it just returns 0, doing nothing.

For amd64, it implements vsyscalls through cheating: if the faulting
address is in the vsyscall area (which is statically known on Linux/amd64),
and the intruction pointer is too, it must have been a vsyscall. In that
case, retrieve the return address from the user stack, fix up %rip and
%rsp, and just execute the normal system call. It will return as if
the vsyscall has been executed.
2005-05-20 12:48:26 +00:00
mrg
f56c2db8b9 tramp and vers are used unconditionally, make them visible everywhere. 2005-05-20 01:06:50 +00:00
manu
53fb6703e5 Add support for Linux SA_RESTORER on amd64. 2005-05-19 21:16:29 +00:00
fvdl
046b9a57dc Implement clock_* POSIX functions. 2005-05-16 21:18:34 +00:00
fvdl
5acb6d8367 Regen. 2005-05-16 21:18:18 +00:00
fvdl
fe3dd48a91 Add clock_* POSIX functions. 2005-05-16 21:17:11 +00:00
fvdl
e18d1a8ee1 Regen. 2005-05-16 16:03:58 +00:00
fvdl
711b0df630 Add *xattr functions (they all return EOPNOTSUPP). 2005-05-16 16:02:19 +00:00
fvdl
2d668e070c Include linux_sigevent.h (to be used later). 2005-05-16 16:00:31 +00:00
fvdl
33e6ca90d5 Add Linux sigevent definitions. 2005-05-16 15:56:41 +00:00
fvdl
7d91366682 Fix up COMPAT_LINUX support for amd64. Still a work in progress, not
usable yet ("Hello World" runs, but many other things do not work).
2005-05-15 21:44:41 +00:00
fvdl
49395ac65e Make the arch_prctl system call use the saved %gs and %fs mechanism. 2005-05-15 21:43:08 +00:00
jmc
9962871387 #endif for LINUX_SS_ONSTACK needs to go after linux_sys_sigaltstack or builds
break on platforms that don't define it (alpha, sparc)
2005-05-09 19:04:50 +00:00
manu
89647c7ca6 First work on COMPAT_LINUX/amd64
Process startup and dynamiclinking work, but processes hang due to
Linux arch_prctl(2) not being really supported yet.
2005-05-03 16:26:27 +00:00
christos
a5fb891bb9 PR/29696: Joel Carnat: NetBSD freezes when accessing smbfs mounted FS with
firefox/linux due to compat getdents() call assumption that all filesystems
support cookies.
2005-04-19 19:00:25 +00:00
christos
14685cd241 s/uvm_map_defaultaddr/uvm_default_mapaddr/ HI FRANK! 2005-03-26 17:10:43 +00:00
fvdl
c487efe4a7 Fix some things regarding COMPAT_NETBSD32 and limits/VM addresses.
* For sparc64 and amd64, define *SIZ32 VM constants.
* Add a new function pointer to struct emul, pointing at a function
  that will return the default VM map address. The default function
  is uvm_map_defaultaddr, which just uses the VM_DEFAULT_ADDRESS
  macro. This gives emulations control over the default map address,
  and allows things to be mapped at the right address (in 32bit range)
  for COMPAT_NETBSD32.
* Add code to adjust the data and stack limits when a COMPAT_NETBSD32
  or COMPAT_SVR4_32 binary is executed.
* Don't use USRSTACK in kern_resource.c, use p_vmspace->vm_minsaddr
  instead (emulations might have set it differently)
* Since this changes struct emul, bump kernel version to 3.99.2

Tested on amd64, compile-tested on sparc64.
2005-03-26 05:12:34 +00:00
christos
37e322ddf6 revert part of previous commit (the block size type and the pad renumbering).
tron says it breaks compat mode.
2005-03-10 23:39:27 +00:00
christos
47e40fce3a Add nanosecond handling on the stat and stat64 code for the i386. 2005-03-10 14:12:27 +00:00
soren
18d6a3043f Emulate basic mtio ioctls. 2005-02-28 22:11:31 +00:00
soren
4f02ad16c6 Remove duplicate statement. 2005-02-28 22:10:46 +00:00
perry
77f2a006d0 regen 2005-02-26 23:58:19 +00:00
perry
a7f74206ba regen 2005-02-26 23:20:00 +00:00
perry
477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
martin
6192fdeaf6 Fix number of elements calculation when converting socket options.
Fixes bugs 4 and 5 reported by Ted Unangst on tech-kern.
2005-02-24 08:15:53 +00:00
soren
f4fa62bcd9 SG_GET_VERSION_NUM returns an int. Also make the version number patchable. 2005-02-13 12:53:54 +00:00
christos
d59582c127 Don't zero out the linux request; we still need values from it.
Limit the sense len to the linux input buffer.
2005-02-13 09:05:31 +00:00
christos
47be3434ec We were zeroing out the wrong struct. 2005-02-13 09:01:25 +00:00
christos
e042c0475e Add scsi-generic stuff. 2005-02-03 00:09:30 +00:00
christos
d3b9209df0 Add linux scsi-generic to work for simple cases. Allows gendalia's change
to limp along. From soren with fixes from me.
2005-02-03 00:09:09 +00:00
christos
0b71a2d5de Don't try to map a 0 size bss. 2005-01-30 23:59:57 +00:00
abs
5958dd944e Fix comments slighly 2004-12-12 20:42:53 +00:00
christos
040c934485 Remove setup stack function. It moved to linux_exec_machdep.c. 2004-11-13 08:58:23 +00:00
christos
b7286f5ccd Add ptyfs pty device number translation. 2004-11-13 07:20:54 +00:00