Commit Graph

3854 Commits

Author SHA1 Message Date
njoly a926b97a8e Enable stat/stat64 nsec time support, for amd64 compat linux/linux32. 2007-04-05 16:39:11 +00:00
dsl 007d96a7bb Get emul_find() to update SCARG(uap, path) instead of assuming that the
updated path parameter is ever valid - especially when emul_find() fails.
Use the modified path for the access() calls.
Found when compiling with emul_find() hacked to always fail.
2007-04-05 07:37:14 +00:00
njoly 5c37954c94 Fix select() behaviour with NULL timeout, to blocks indefinitely
instead of returning immediately.
Reported by Edgar Fuß on port-amd64@.
2007-04-02 16:29:55 +00:00
hubertf ef314e20d0 Remove duplicate #include <sys/param.h>,
and pull in the <sys/cdefs.h> needed for __KERNEL_RCSID

From: Slava Semushin <php-coder@altlinux.ru>
2007-03-26 22:44:40 +00:00
cube c8ff1b6980 Count environment vars with envc, not argc [hi dsl!]. Reported by Nicolas
Joly in private mail.
2007-03-26 17:12:02 +00:00
njoly 471f710a5a Sync with recent compat linux termios changes. 2007-03-26 13:46:50 +00:00
njoly 6bf18aa85e Update i386 LINUX_{TIOCGPTN,TIOCSPTLCK} definitions for latest
linux_ioctl_termios() changes.
2007-03-26 12:26:11 +00:00
rmind 7b9af0160d Handle newlwp() error case. Currently, newlwp() cannot fail, but this
will likely change in the future.
2007-03-24 16:43:56 +00:00
njoly 1f4051d826 Fix generated file names from makesyscalls.sh (s/linux/linux32/).
From Edgar Fuß in PR/35956.
2007-03-23 12:26:10 +00:00
mrg 2cdaa49944 implement emul.linux.kern.machine, which can be set to "i686", like
some applications seem to want.
2007-03-23 04:16:13 +00:00
tsutsui 251bb51bf0 Fix shadowed declaration warning. 2007-03-20 11:39:34 +00:00
njoly 226b6c843f Add ktrace I/O support to netbsd32_ioctl() syscall.
Reviewed by cube.
2007-03-20 11:02:18 +00:00
cube e80df1a6aa Typo. Reported by martin. 2007-03-20 09:11:04 +00:00
cube e8beebe1e2 More SCARG_P32 fallout. 2007-03-20 08:25:37 +00:00
cube 35a0a309fb Fix typo. Reported by martin. 2007-03-20 08:12:42 +00:00
njoly f408971232 Fix TIOCGPTN ioctl.
Do not use sysioctl() directly, but netbsd32_ioctl() instead.
2007-03-19 10:16:46 +00:00
dsl d364d308c7 Change all the NETBSD32PTR64(SCARG(uap, xxx))) to SCARG_P32(uap, xxx). 2007-03-18 21:38:32 +00:00
tsutsui 3f372aff43 Fix compile errors in the previous:
- include <sys/filedesc.h> for do_sys_stat()
- include <sys/namei.h> for FOLLOW and NOFOLLOW
- add missing semicolons
- fix typos
2007-03-17 17:02:44 +00:00
dsl a065e51621 remove all the double (and triple) casts used to convert 32bit userspace
pointers to and from 64bit kernel pointers.  Instead use the defines
NETBSD32PTR64(p32) to read a 32bit pointer and (the new) NETBSD32PTR32(p32,p64)
to write a 32bit pointer throughout.
The 32bit pointer is now a struct to enforce the above.
amd64 (with linux emul) and sparc64 will both compile (when the arch stuff
goes in soon), and amd64 still runs some i386 binaries.
2007-03-16 22:21:40 +00:00
manu 91e99f33d3 Add ptmx fakedevice hack for amd64
Fix a bug in ioctl handling
2007-03-14 21:52:17 +00:00
njoly de5304fe4b Regen (statfs/fstatfs fixes). 2007-03-14 12:47:46 +00:00
njoly 4e3a8d7d1d Fix compat linux statfs/fstatfs syscalls on amd64.
- Do not use statfs64/fstatfs64 as they have an extra size argument.
- Add full 64bit linux struct statfs support.

ok by manu
2007-03-14 12:44:39 +00:00
ad 59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
dsl 6803111cb3 Fix amd64 build for compat sys_stat() changes.
This file isn't included in amd64:GENERIC
2007-03-11 19:36:37 +00:00
dsl 893faeae9e Update all the compat stuff to not use the 'stackgap' for processing
sys_stat() and friends, instead use do_sys_stat() and do_sys_fstat()
that write the answer into a kernel buffer (on stack) that can be
converted to the correct form and written the userspace.
I've test compiled a few kernels, and tested i386 netbsd1.6 ls.
Given I think I've fixed some bugs, it might be 50-50 with new ones.
2007-03-10 21:40:23 +00:00
dsl 935d2b1c7f Use the support routines from kern_syscalls.c instead of rolling our own code. 2007-03-10 17:33:29 +00:00
ad c147748d84 - Make the proclist_lock a mutex. The write:read ratio is unfavourable,
and mutexes are cheaper use than RW locks.
- LOCK_ASSERT -> KASSERT in some places.
- Hold proclist_lock/kernel_lock longer in a couple of places.
2007-03-09 14:11:22 +00:00
tsutsui 4fc7add5a3 Use (char *) to appease -Wpointer-arith. 2007-03-06 12:41:52 +00:00
dogcow f18ef70a25 semimechanically convert 'void foo' -> 'void *foo', as part of the continuing
caddr_t fallout.
2007-03-05 21:05:00 +00:00
christos 033371b01a fix caddr_t lossage 2007-03-05 14:24:18 +00:00
christos c74f0279ea more caddr_t lossage. 2007-03-05 14:13:10 +00:00
he 1564bbc49c Need a char* for doing pointer arithmetic. 2007-03-05 13:56:24 +00:00
tsutsui 48174a79c0 Use (char *) cast on pointer arith. 2007-03-05 10:43:32 +00:00
christos a4c52808c6 fix caddr_t lossage. 2007-03-05 05:10:04 +00:00
yamt 18e17bd568 fix fallout from caddr_t changes. 2007-03-04 15:46:18 +00:00
yamt 731acd91f9 fix fallout from caddr_t changes. 2007-03-04 15:41:02 +00:00
tsutsui 543ff60bc5 Use (char *) on pointer arith. 2007-03-04 11:56:26 +00:00
tsutsui a58c189444 - don't forget to add * to all params
- use (char *) where pointer arith is required
2007-03-04 11:15:04 +00:00
christos 5ebcdbe8b5 fix caddr_t fallout. 2007-03-04 10:21:25 +00:00
christos fffc9c66c9 fix fallout from caddr_t changes. 2007-03-04 07:54:07 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
tsutsui 4007519959 Make this timecounter(9) ready. From kardel@. 2007-03-04 02:49:12 +00:00
he 96f8f675f8 Complete the ANSI conversion by completing the conversion of hpux_sys_rtprio(). 2007-02-19 18:43:17 +00:00
cube 26a6c15e1a Regen (a few MPSAFE additions). 2007-02-19 15:33:20 +00:00
cube b2d510bccc Mark MPSAFE the syscalls that are not translated (and of course, only when
the native syscall is itself marked MPSAFE).
2007-02-19 15:32:43 +00:00
cube 632ece3eaf Introduce a new member to struct emul, e_startlwp, to be used by
sys__lwp_create.  It allows using the said syscall under COMPAT_NETBSD32.

The libpthread regression tests now pass on amd64 and sparc64.
2007-02-19 15:10:02 +00:00
cube 0ff7d99ddb Make netbsd32_{get,set}ucontext and associated functions
{get,set}ucontext32 look like their native counterparts again after
newlock2 merge.  This avoids entering sigprocmask1 without the proc mutex
held...
2007-02-19 14:39:43 +00:00
rumble 121cbf17f1 Remove an unused variable so that this compiles again. 2007-02-19 03:55:26 +00:00
ad cee712ad2f Make this build. 2007-02-19 01:19:16 +00:00
cube c7565916df Regen (missing lwp syscalls). 2007-02-18 15:00:14 +00:00