Commit Graph

537 Commits

Author SHA1 Message Date
njoly fd24f7c917 Regen for netbsd32_dev_t. 2009-03-16 20:49:16 +00:00
njoly 0f21bb4a22 Fix dev_t alignment, by not using the new 64bit value directly but
rather a 32bit aligned version (netbsd32_dev_t = netbsd32_uint64).

ok by cube@.
2009-03-16 20:48:13 +00:00
cegger 7038d1e471 ansify function definition 2009-03-15 15:54:43 +00:00
skrll 5ccc095a3e Fix the posix_fadvise return value... finally.
Tested martin on sparc64/m68k and me on hppa.
2009-03-04 18:11:24 +00:00
christos 4538aa34ee Regen 2009-02-26 21:09:00 +00:00
christos 6d029d549a fix kernel build with no options NTP 2009-02-26 21:08:48 +00:00
njoly b5ae97a41a Cleanup. Kill a few netbsd32_caddr_t in syscalls argument types. 2009-01-30 13:01:36 +00:00
njoly 73abc6838e Revert the previous packed attribute fix. Instead make netbsd32_time_t
of type netbsd32_int64 which provides a 64-bit value with a 32-bit
alignment.

Suggested by dsl.
2009-01-28 00:43:04 +00:00
njoly f01722c17f Make netbsd32_timespec/netbsd32_timeval structures packed. This fix an
alignment problem between 64-bit kernel and 32-bit userland versions,
which ended in different structure sizes.
2009-01-28 00:02:39 +00:00
njoly 3e5b27ff8e Make all fstat(2) compat syscalls consistently use do_sys_fstat(),
instead of fd_getfile()/fd_putfile() dance.

ok by christos.
2009-01-26 13:00:04 +00:00
christos f7636e0eb3 fix casts. 2009-01-25 01:22:42 +00:00
tron 1c6c1db2da Revert accidental of some rogue changes which broke the build. 2009-01-21 10:01:42 +00:00
tron 31faff7381 Include "bsd.own.mk" to get the definition of "NETBSDSRCDIR" via
"/etc/mk.conf". This fixes manual use of "make cleandir".
2009-01-20 22:49:29 +00:00
pooka 09ba2d6689 Regen to prove I didn't screw up the conversion: purely RCSID changes. 2009-01-13 22:33:11 +00:00
pooka a9a2ce837b Convert the syscalls.master to a format from which it is easier
to parse and generate the compat name and basename (e.g. __stat50
and stat).  Use this to autogenerate __RENAME()'s to the rump_syscalls
header so that they can be called e.g. rump_sys_socket() instead
of rump_sys___socket30().
2009-01-13 22:27:43 +00:00
pooka 0b40ab56ee regen: UNIMPL police 2009-01-13 21:49:16 +00:00
pooka c3a8bfb54e UNIMPL police: remove pseudo-prototypes 2009-01-13 21:48:35 +00:00
nakayama 60d7add52e Follow christos-time_t merge. 2009-01-11 13:14:14 +00:00
christos 461a86f9bd merge christos-time_t 2009-01-11 02:45:45 +00:00
cegger 9b87d582bd kill MALLOC and FREE macros. 2008-12-17 20:51:31 +00:00
mrg 3b1d48844e regenerate 2008-11-22 23:14:01 +00:00
mrg 672c98ee5a implement netbsd32__sched_setparam(), netbsd32__sched_getparam(),
netbsd32__sched_setaffinity() and netbsd32__sched_getaffinity().
2008-11-22 23:13:38 +00:00
tron 709a35c482 Make it possible to compile a kernel with COMPAT_NETBSD32 but without
COMPAT_40. This fixes PR port-amd64/39967.
2008-11-20 11:56:40 +00:00
ad e157b99c7c Regen. 2008-11-19 18:39:43 +00:00
ad 92ce8c6a3d Make the emulations, exec formats, coredump, NFS, and the NFS server
into modules. By and large this commit:

- shuffles header files and ifdefs
- splits code out where necessary to be modular
- adds module glue for each of the components
- adds/replaces hooks for things that can be installed at runtime
2008-11-19 18:35:57 +00:00
ad 7bd1ee08d6 Regen. 2008-11-14 15:50:01 +00:00
ad 18e73e1ebe Replace semid_t with intptr_t. No function change. This is a libc/kernel
private interface and so the name change should not affect any third
party code.
2008-11-14 15:49:20 +00:00
ad 0efea177e3 Remove LKMs and switch to the module framework, pass 1.
Proposed on tech-kern@.
2008-11-12 12:35:50 +00:00
mrg 27498ba7bc if the interpreter is literally "/usr/libexec/ld.elf_so" or
"/libexec/ld.elf_so", try <path>-<machine32arch>.
2008-10-26 07:07:35 +00:00
wrstuden 4fb41e761e Merge wrstuden-revivesa into HEAD. Catch some files that I forgot
to revive on HEAD in previous commit.
2008-10-15 06:52:38 +00:00
wrstuden fc7511b00e Merge wrstuden-revivesa into HEAD. 2008-10-15 06:51:17 +00:00
christos aa389c698d Use more timespecs internally. From Alexander Shishkin and me.
Welcome to 4.99.70, 30 more to go for 100.
2008-07-15 16:18:08 +00:00
matt 7408df1239 Change {ff,fd}_exclose and ff_allocated to bool. Change exclose arg to
fd_dup to bool.  Switch assignments from 1/0 to true/false.

This make alpha kernels compile.  Bump kern to 4.99.69 since structure
changed.
2008-07-02 16:45:19 +00:00
ad a00bd89dab Replace references to getsock/getvnode. 2008-06-24 11:18:14 +00:00
njoly 0237fe6def Update compat netbsd32 SIOCGIFCONF ioctls definitions to follow native
ones.
2008-06-23 23:14:42 +00:00
njoly 8cb9e382ae netbsd32_ifreq_tp_t should be of type netbsd32_pointer_t, not int32_t. 2008-06-22 22:40:15 +00:00
njoly e8822e5c92 When converting msqid_ds structure from/to netbsd32 for msgctl(2)
IPC_STAT/IPC_SET, do not try to fill private struct members
_msg_first/_msg_last which do not exists.
2008-06-02 14:12:08 +00:00
mrg c2b95373bf remove clause #3 from my license where there are no other
copyright holders involved.
2008-05-29 14:51:25 +00:00
njoly c188bc4dd4 Fix netbsd32_ipc_perm and netbsd32_shmid_ds structures to use correct
types.
2008-05-24 16:02:44 +00:00
wrstuden 97003b024b Oops. These are supposed to come alive on the branch, not the head. 2008-05-11 00:18:09 +00:00
wrstuden dbbab92bc9 Initial checkin of re-adding SA. Everything except kern_sa.c
compiles in GENERIC for i386. This is still a work-in-progress, but
this checkin covers most of the mechanical work (changing signalling
to be able to accomidate SA's process-wide signalling and re-adding
includes of sys/sa.h and savar.h). Subsequent changes will be much
more interesting.

Also, kern_sa.c has received partial cleanup. There's still more
to do, though.
2008-05-10 23:48:44 +00:00
ad 42d0626726 PR kern/38141 lookup/vfs_busy acquire rwlock recursively
Simplify the mount locking. Remove all the crud to deal with recursion on
the mount lock, and crud to deal with unmount as another weirdo lock.

Hopefully this will once and for all fix the deadlocks with this. With this
commit there are two locks on each mount:

- krwlock_t mnt_unmounting. This is used to prevent unmount across critical
  sections like getnewvnode(). It's only ever read locked with rw_tryenter(),
  and is only ever write locked in dounmount(). A write hold can't be taken
  on this lock if the current LWP could hold a vnode lock.

- kmutex_t mnt_updating. This is taken by threads updating the mount, for
  example when going r/o -> r/w, and is only present to serialize updates.
  In order to take this lock, a read hold must first be taken on
  mnt_unmounting, and the two need to be held across the operation.

One effect of this change: previously if an unmount failed, we would make a
half hearted attempt to back out of it gracefully, but that was unlikely to
work in a lot of cases. Now while an unmount that will be aborted is in
progress, new file operations within the mount will fail instead of being
delayed. That is unlikely to be a problem though, because if the admin
requests unmount of a file system then s(he) has made a decision to deny
access to the resource.
2008-05-06 18:43:44 +00:00
ad 928a6b2096 PR kern/38135 vfs_busy/vfs_trybusy confusion
The previous fix worked, but it opened a window where mounts could have
disappeared from mountlist while the caller was traversing it using
vfs_trybusy(). Fix that.
2008-04-30 12:49:16 +00:00
jmmv b8f1187ff1 Fix build of these files after the vfs_trybusy change. Apply the same
modification done in compat/common/vfs_syscalls_20.c:1.27.
2008-04-30 06:49:23 +00:00
martin 3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
ad 284c2b9aef Merge proc::p_mutex and proc::p_smutex into a single adaptive mutex, since
we no longer need to guard against access from hardware interrupt handlers.

Additionally, if cloning a process with CLONE_SIGHAND, arrange to have the
child process share the parent's lock so that signal state may be kept in
sync. Partially addresses PR kern/37437.
2008-04-24 18:39:20 +00:00
ad 6d70f903e6 Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.
2008-04-24 15:35:27 +00:00
ad 026542bb25 Regen. 2008-04-24 11:51:47 +00:00
ad 30abe39468 - Retire SYCALL_MPSAFE. With the exceptions of darwin and irix emulations,
all system calls are now MPSAFE.
- Remove unneeded acquire/release of kernel_lock.
2008-04-24 11:51:18 +00:00
ad e0b56ca8f5 Fix locking. 2008-04-23 13:34:44 +00:00