[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Future use of OSKit facilities in gnumach

From: John Tobey
Subject: Future use of OSKit facilities in gnumach
Date: Sun, 2 Mar 2003 19:40:04 -0500
User-agent: Mutt/1.3.28i

I see that GNU Mach links with a few OSKit libraries including
-loskit_c.  However, it seems to require only a few functions from
that library, and most (all?) of its OSKit dependencies exist for the
device driver framework ("osenv").

Is there any plan to integrate the Mach parts more closely with OSKit
facitilies?  What about thread safety?  I notice the following comment
in OSKit source (oskit/libc/malloc/mem_lock.c):

 * The Minimal C library version of mem_lock does nothing. You need to
 * use the FreeBSD C library if you want to multithread an oskit kernel.
 * Note that you need to arrange for the kernel version of these functions
 * to be linked in if your program calls malloc out of device drivers (as
 * the network drivers are want to do).

I assume the reference is to liboskit_freebsd_c{,_r}.a.  Does that
library figure at all in GNU Mach's future?

I ask because I have a hope of turning GNU Mach into a GNU/Linux
userspace application, and I am weighing which OSKit libraries and
headers to try to include in the mix.  So far, I am using the address
map manager library, which GNU Mach does not use.  It relies (sort of)
on smalloc() and printf() from the C library, but those dependencies
can be worked around.  I don't see any use for the Unix emulation
library, unless maybe the alternatives require modifying or
reconfiguring the OSKit libraries.  If an alternative is to
conditionalize inclusion of <oskit/c/*> in a few places in GNU Mach,
that looks easier.  Namely:

    $ find gnumach -name '*.[ch]' |xargs grep oskit/c/
    gnumach/kern/assert.h:#include <oskit/c/assert.h>
    gnumach/kern/bootstrap.c:#include <oskit/c/stdio.h>
    gnumach/oskit/x86/main.c:#include <oskit/c/unistd.h>
    gnumach/oskit/ds_osenv.c:#include <oskit/c/stdlib.h>
    gnumach/oskit/ds_osenv.c:#include <oskit/c/termios.h>
    gnumach/oskit/ds_routines.c:#include <oskit/c/stdlib.h>
    gnumach/oskit/osenv_log.c:#include <oskit/c/stdio.h>

Certainly, I would be replacing x86/main.c, and maybe some of the
others in gnumach/oskit/.  My question is, are there likely to be more
files that use oskit/c stuff in the foreseeable future?


John Tobey <jtobey@john-edwin-tobey.org>
/\  /\

reply via email to

[Prev in Thread] Current Thread [Next in Thread]