Commit Graph

21 Commits

Author SHA1 Message Date
pooka 2310c71b91 Until debugging threaded programs in NetBSD is fixed, supply the
cpp option RUMP_WITHOUT_THREADS as a workaround.  If defined, it
makes rump itself operate single-threaded and prevents kthread_create()
from working.
2008-01-22 09:23:39 +00:00
reinoud ef25457ba7 pthread_cond_timedwait() needs an absolute time to wait for instead of the
relative time in ticks.
2008-01-18 14:12:19 +00:00
pooka fd1f386de1 fix incorrect tick -> timespec calculation. noticed by reinoud 2008-01-17 21:05:36 +00:00
pooka daaf5e53c9 initialize error value 2008-01-03 02:38:23 +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 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 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 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 18ae49a27c Make the strategy routine get the results through biowait() and
the "disk driver" (rumpuser) call biodone() to indicate the completion
of I/O.  Support for B_ASYNC is coming at some point, but I need
more locking support in the emulated vm for that.
2007-11-04 18:43:55 +00:00
pooka 87f9ee4c42 Make it possible to run rumps multithreaded. This brings real
locking and makes it possible to run file systems which create
threads.  It also makes rump file system behaviour better match
file system behaviour in the kernel.
2007-10-31 15:57:19 +00:00
pooka b795ecbe79 fsync() device fd if doing a non-B_ASYNC write. This makes the
file system safe, but less performant as the kernel, as it syncs
*all* outstanding dirty buffers.  However, we don't have much choice
in userspace currently.
2007-09-20 23:43:44 +00:00
pooka ccd777c8fa Provide errno from rumpuser_{gettimeofday,close}() to be consistent. 2007-09-10 19:11:44 +00:00
pooka 3c2765f1a3 Hide NetBSD kernel headers completely from ukfs. This includes creating
accessors for:
  * struct mount & VFS ops
  * struct uio
  * struct vnode
  * struct vattr

and some namespace games for:
  * namei flags
  * VOPs
  * enum vtype

Also, split rump services into two categories: library private and public
(rump_private.h and rump.h, respectively).

As a result, it is now possible to compile and use the NetBSD kernel
file systems on Linux (and probably other systems too with very
little work), although the makefiles need a bit of work to make it
a pleasureable experience.
2007-08-20 15:58:13 +00:00
pooka cfd4dc8f38 Wrap malloc() so that we catch the kernel arguments (namely M_ZERO)
properly.  It's fairly amusing that this wasn't noticed until now.
2007-08-15 22:13:15 +00:00
pooka d70a2a3a9d realpath() can also fail, take that into account 2007-08-07 20:40:53 +00:00
pooka 711e2ec866 always compile with -g for now 2007-08-07 20:39:54 +00:00
pooka 24293880e1 in case of no error, init *error to 0 2007-08-07 16:55:22 +00:00
pooka a92a4f649f Allow to de/register pathnames which should be faked as block
devices instead of faking all non-blks as blks in namei().
2007-08-06 22:20:57 +00:00
pooka daafee8742 Introduce RUMPs - Runnable Userspace Meta-Programs
/sys/rump contains programs which run unmodified kernel code in an
emulated userspace environment.  The kernel environment is provided
by librump.  Currently supported are a number of file systems,
which by using puffs integrate seamlessly into the system and
provide a similar user experience to if the code was running as
part of the kernel.  Potential future rumpification targets include
for example parts of the networking stack and some device drivers.

This work was supported by Google Summer of Code 2007.
2007-08-05 22:28:00 +00:00