On Wed, Jul 9, 2014 at 12:27 PM, Antti Kantee <[email protected]> wrote:
> Nice.  Some minor comments, just to give the impression that I reviewed
> the diff:
>
> RUMP_THREADS is not a good name.  First, RUMPUSER is more correct.  I'm
> not sure THREADS is good either.  How about MULTITASKING? (or is it too

hmm, what is wrong with RUMPUSER_THREADS? or _THREADING? its the
choice of thread implementation... specifically to run kernel
threads???

> long?).  Also, maybe context->fibers?  I called the same swapcontext()
> mechanism "continuations" in puffs, but strictly speaking they're not
> continuations.  I think "fibers" is a good name.

ok

> -D_REENTRANT is not a property of the threading model used internally by
> librumpuser, so I think it should remain unconditionally defined.

ok

> Since you're splitting rumpuser_file.c, you could add a comment at the
> top saying that the interfaces implemented by that file will most likely
> be going away in hypercall rev 18.

ok

> Here's an (untested) implementation of the bio call:
>
> void
> rumpuser_bio(int fd, int op, void *data, size_t dlen, int64_t doff,
>          rump_biodone_fn biodone, void *bioarg)
> {
>          ssize_t rv;
>          int error = 0;
>
>          if (op & RUMPUSER_BIO_READ) {
>                  if ((rv = pread(fd, data, dlen, doff)) == -1)
>                          error = errno;
>          } else {
>                  if ((rv = pread(fd, data, dlen, doff)) == -1)
>                          error = errno;
>                  if (error == 0 && (op & RUMPUSER_BIO_SYNC)) {
> #ifdef __NetBSD__
>                          fsync_range(fd, FDATASYNC, doff, dlen);
> #else
>                          fsync(fd);
> #endif
>                  }
>          }
>          if (rv == -1)
>                  rv = 0;
>          biodone(bioarg, (size_t)rv, error);
> }

I like the deliberate error.

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
rumpkernel-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rumpkernel-users

Reply via email to