Commit Graph

21 Commits

Author SHA1 Message Date
christos 31c81b28f5 Cloning cleanup:
1. make fileops const
2. add 2 new negative errno's to `officially' support the cloning hack:
    - EDUPFD (used to overload ENODEV)
    - EMOVEFD (used to overload ENXIO)
3. Created an fdclone() function to encapsulate the operations needed for
   EMOVEFD, and made all cloners use it.
4. Centralize the local noop/badop fileops functions to:
   fnullop_fcntl, fnullop_poll, fnullop_kqfilter, fbadop_stat
2004-11-30 04:25:43 +00:00
simonb b5d0e6bf06 Initialise (most) pools from a link set instead of explicit calls
to pool_init.  Untouched pools are ones that either in arch-specific
code, or aren't initialiased during initial system startup.

 Convert struct session, ucred and lockf to pools.
2004-04-25 16:42:40 +00:00
jdolecek 159f41eca4 allocate wired memory for the marker kevent in kqueue_scan() instead
of using on-stack memory, so that this wouldn't eventually cause kernel
panic if the process get swapped out and another process runs kqueue_scan()
problem pointed out in kern/24220 by Stephan Uphoff
2004-02-14 11:56:28 +00:00
jdolecek a1090edbd2 fix assertion - non-alive processes are in SZOMB state now
fixes PR kern/24033 by Martin Husemann
2004-01-11 18:51:15 +00:00
fvdl e4f5334745 Unlock kq_lock in the case of a timeout. 2003-07-18 17:34:07 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
jdolecek 7942f6611a add __KERNEL_RCSID() 2003-06-23 13:14:49 +00:00
dsl 60418b39b7 Change 'data' argument to fo_ioctl and fo_fcntl from 'caddr_t' to 'void *'.
Avoids a lot of casting and removes the need for some line breaks.
Removed a load of (caddr_t) casts from calls to copyin/copyout as well.
(approved by christos - he has a plan to remove caddr_t...)
2003-03-21 21:13:50 +00:00
pk 025e435477 Protect the event queue with a simple mutex; this only partially addresses
MP-safety issues in the event handling system.
2003-02-23 22:05:35 +00:00
pk f326711134 Use splsched() instead of splhigh() to protect the triggered event queues. 2003-02-23 21:44:26 +00:00
pk 2931081a79 Make updating a file's reference and use count MP-safe. 2003-02-23 14:37:32 +00:00
jdolecek b4a06ab5af simplify timeout handling code in kqueue_scan() 2003-02-21 20:57:09 +00:00
jdolecek 97ec641999 Introduce EVFILT_TIMER, which allows a process to establish an
arbitrary number of timers, both oneshot and periodic.

from FreeBSD, only adapted to NetBSD kernel API - mstohz() instead
of tvtohz(), and takes advantage of callout_schedule() in filt_timerexpire()
2003-02-04 09:02:04 +00:00
thorpej b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
thorpej e0d8d366df Merge the nathanw_sa branch. 2003-01-18 10:06:22 +00:00
christos e22906f6d0 si_ -> sel_ to avoid conflicts with siginfo. 2002-11-26 18:44:34 +00:00
jdolecek 1e0e4766d3 kevent(2): if the specified timeout is >=1ns and <1us, perform a poll
rather than waiting forever due to TIMESPEC_TO_TIMEVAL() conversion
2002-11-08 20:26:50 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
lukem dfaec93e4e move to kqueue branch for now 2001-07-10 11:59:50 +00:00
lukem dafe2b38ba freebsd kqueue implementation 2001-07-06 08:01:32 +00:00