[Top][All Lists]

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

Re: GNU Mach glue code update

From: Richard Braun
Subject: Re: GNU Mach glue code update
Date: Tue, 22 Aug 2006 13:11:34 +0200
User-agent: Mutt/1.5.9i

On Tue, Aug 22, 2006 at 01:49:01PM +0300, Constantine Kousoulos wrote:
> Hello,
> As it seems, mach has a "dual" device interface. Firstly, there
> is the native device interface (device_open, device_close etc).
> Secondly, there is the linux emulation device interface (again
> device_open, device_close, etc in seperate files) that glues linux
> drivers with mach.
> How does mach decide which routine to call (native or emulation)?
> I am in the process of writing glue code for linux-2.6 drivers, so
> an answer would speed development.

Actually, there is only one interface, the device_xxx() routines. These
can be found in i386/i386at/device_emul.h. Each driver, or driver class
must create a structure with pointers to the corresponding functions,
which are usually declared static, and named device_open(), device_close(),
and so on. Once this structure is set, you must "register" it in
i386/i386at/i386at_ds_routines.c. You can use [1] and [2] as "working"
examples (I have problems with my network access, so my CVS repository
is currently not always reachable :-/).

Good luck.

Richard Braun


Attachment: signature.asc
Description: Digital signature

reply via email to

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