Commit Graph

181 Commits

Author SHA1 Message Date
pooka
f8ff426bbb fix build for OBJDIR case. noticed by plenty 2008-01-02 22:01:41 +00:00
pooka
4f69d01d2f Add the ability to run puffs in userspace. This means that puffs
can now be developed in userspace using puffs for development
(I hate emulators, they are annoyingly clumsy).

To e.g. mount psshfs using puffs-on-puffs, run fs/bin/syspuffs/syspuffs
with the regular mount_psshfs command line as an argument:

    golem> ./syspuffs /usr/sbin/mount_psshfs ftp.netbsd.org:/pub /puffs

This will make the mount appear as usual, with the exception that the
requests will be passed through puffs both in the kernel and userspace:

    ftp.netbsd.org:/pub on /puffs type puffs|p2k|puffs|psshfs
2008-01-02 18:15:12 +00:00
pooka
3c068d8021 fix vmlocking2 fallout:
* I heard a wild rumor that vp_interlock is a mutex these days (hi ad!)
* init new locks (hi ad)
* observe that with simple_locks only deadlocks would be caught while
  releasing unlocked locks would go unnoticed.  make locking work (hi pooka)
2008-01-02 15:44:03 +00:00
ad
ae47be00a8 Provide valloc(), fix vfree(). 2008-01-02 13:42:47 +00:00
ad
896ac1329e Build intr.c. 2008-01-02 12:49:53 +00:00
ad
888ef28a4d Fix merge error. 2008-01-02 12:46:07 +00:00
ad
4a780c9ae2 Merge vmlocking2 to head. 2008-01-02 11:48:20 +00:00
pooka
ffd37c1db1 pass mmap to file systems 2008-01-01 22:31:42 +00:00
pooka
d89e3e05a2 emulate a couple more locking interfaces 2008-01-01 22:03:24 +00:00
pooka
312cc39e60 pull in atomic ops from vmlocking2 2007-12-30 23:30:26 +00:00
pooka
7baf23bce3 fake sigcantmask 2007-12-30 23:29:06 +00:00
pooka
ec137c87f4 steal 1.4.2.1 from vmlocking2: cv_xwait_sig() 2007-12-30 03:35:20 +00:00
perry
b6a2ef7569 Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
2007-12-25 18:33:32 +00:00
pooka
6db2b1c100 LFS_KERNEL_RFW 2007-12-13 16:08:12 +00:00
elad
021227aa78 Don't compile lfs_rfw.c, suggested by cube@. 2007-12-12 18:52:00 +00:00
pooka
db06a930e6 Remove cn_lwp from struct componentname. curlwp should be used
from on.  The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.
2007-12-08 19:29:36 +00:00
ad
4b293a84e1 Interrupt handling changes, in discussion since February:
- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
2007-12-03 15:33:00 +00:00
hannken
b1446c225c Make it compile again. 2007-12-02 18:24:34 +00:00
yamt
e8abff70f2 constify pagerops. 2007-12-01 10:40:27 +00:00
dsl
956bff160a Temporarily make 'atomic_add_int()' a non-atomic add so the build suceeds.
At some point the functions will (presumably) make their way into either
libc or libutil.
2007-11-30 21:48:40 +00:00
pooka
21913eabe5 Rototill.
Ok, ok, a few more words about it: stop holding puffs_cc as a holy
value and passing it around to almost every possible place (popquiz:
which kernel variable does this remind you of?).  Instead, pass
the natural choice, puffs_usermount, and fetch puffs_cc via
puffs_cc_getcc() only in routines which actually need it.  This
not only simplifies code, but (thanks to the introduction of
puffs_cc_getcc()) enables constructs which weren't previously sanely
possible, say layering as a curious example.

There's still a little to do on this front, but this was the major
fs interface blast.
2007-11-30 19:02:28 +00:00
pooka
6a3d9a187d Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces.  puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
2007-11-27 11:31:17 +00:00
dogcow
1e02f40f0f fallout from the not-quite-complete curlwp removal.
I'm not sure why I had to monkey about with the includes to get VFS_SYNC to
reappear.
2007-11-27 09:14:21 +00:00
pooka
61e8303e9d Remove the "struct lwp *" argument from all VFS and VOP interfaces.
The general trend is to remove it from all kernel interfaces and
this is a start.  In case the calling lwp is desired, curlwp should
be used.

quick consensus on tech-kern
2007-11-26 19:01:26 +00:00
pooka
5251a48396 support cv_broadcast() 2007-11-19 14:17:22 +00:00
pooka
2632ba6df4 Implement cv_timedwait(), requested by Reinoud. 2007-11-17 20:50:18 +00:00
pooka
8f1126a23d Shield against returning EJUSTRETURN from relookup() 2007-11-14 15:01:46 +00:00
pooka
f48aa71ad4 fix build (hi rmind!) 2007-11-11 17:18:47 +00:00
pooka
655af89222 Fix more uninitialized uses of variables.
noticed by lukasz.siemiradzki
2007-11-10 18:03:15 +00:00
pooka
f94895de17 Cast void * to intptr_t before casting to int and vice versa.
Fixes 64bit compilation warnings.  reported by moof & wiz
2007-11-08 10:57:19 +00:00
pooka
7e0d71a369 Execute I/O in a separate thread for async I/O where previously
everything was written/read in caller context.

Also, make the "kernel" lock recursive.  It works better that way ...
2007-11-07 18:59:18 +00:00
pooka
b1a1a009b6 final splash of ketchup after source update: init/fini mountspecific 2007-11-07 16:31:21 +00:00
pooka
6fd64d7496 implement _kernel_lock{,_unlock}() 2007-11-07 16:24:22 +00:00
pooka
a4fdbff490 fix pool cache line alignment code (hi ad) 2007-11-07 16:22:22 +00:00
pooka
55a3e632c4 remove accidentally committed debugging code 2007-11-07 15:51:07 +00:00
pooka
eabd71f058 Emulate spls by using pthread rwlocks: splfoo() takes a read lock
and when doing processing in an interrupt (effectively when calling
biodone()), we take the write lock.
2007-11-07 15:41:18 +00:00
pooka
ae80a527f0 oops, backout part which wasn't supposed to go in 2007-11-07 12:11:30 +00:00
pooka
0a587be2cb Call buf_syncwait() after releasing a file system. 2007-11-07 12:08:45 +00:00
ad
d18c6ca4de Merge from vmlocking:
- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.
2007-11-07 00:23:13 +00:00
ad
4f48f4962d Define ipl_cookie_t, ipl_t. 2007-11-07 00:20:22 +00:00
pooka
773d31b14b yank out extra debug printf 2007-11-06 15:25:40 +00:00
pooka
210515ea9c Fix locking issues with the anonymous pager too so that tmpfs can work. 2007-11-06 12:57:50 +00:00
pooka
7331777bf0 default to rootnode mode 0777 2007-11-06 12:26:12 +00:00
pooka
78821d0076 initialize vnode interlock when creating one 2007-11-06 12:14:37 +00:00
pooka
895e09b8c5 Sprinkle some more locking, especially to the vm. Due to some
additional fixes, it's now possible to run file systems with
spinlocks actually enabled.  The genfs_putpages() locking is still
working only due to greater powers, but I'll eventually get around to
fixing it.
2007-11-06 11:35:04 +00:00
pooka
ef11b00de6 Update to new puffs_mainloop() signature. Forgot to do this yesterday.
noticed by Kurt Schreiner on current-users
2007-11-06 10:57:35 +00:00
pooka
2525a332ae * sprinkle some locking into the vm code
* avoid extra insert+search+remove step in file systems using
  ubc_uiomove() instead of standard uiomove()
2007-11-04 19:52:14 +00:00
pooka
85efd8ec20 set mask and dirmask to 0777 by default 2007-11-04 19:42:56 +00:00
pooka
0be31eefc7 Allocate buf using getiobuf() instead of abusing the stack. 2007-11-04 19:37:29 +00:00
pooka
08ac8063af Fix some comments: thinking of it more closely, it is actually safe
to release the sleep interlock before calling cv_wait() because we
are protected by the list mutex which prevents a wakeup race.
2007-11-04 18:46:29 +00:00