On Wed, Oct 10, 2001 at 06:46:22PM -0400, Roland McGrath wrote:
> gnumach is never going to have SMP support anyway, so it's all moot (and
> the macros you are using expand to empty).  In oskit-mach, I think we
> should get rid of the lookup table and just hang the data directly off the
> device_t.

That's okay by me, but I looked at the code now and it's not trivial.

The whole purpose of re-using devices requires that dev_open_alloc works for
us.  This allocates a new struct device in the device zone, which has a
fixed size.  So I guess we could make room in the zone for us (pass a larger
size than sizeof(struct device) to zinit), or we make use of space in struct
device_t itself.  There seems to be enough room in the union for example.
I guess I can just use the following:

struct io_perm
union
{
  struct device dev;

  struct io_perm_range
    {
      char [offsetof (struct device) - offsetof (struct device, com)];
      unsigned short from, to;
    } range;
};

Is there an easy way to check at compile time that the size doesn't exceed
sizeof(struct device) at *compile* time?  (cpp can't do it, but gcc has all
the necessary information).

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org [EMAIL PROTECTED]
Marcus Brinkmann              GNU    http://www.gnu.org    [EMAIL PROTECTED]
[EMAIL PROTECTED]
http://www.marcus-brinkmann.de

_______________________________________________
Bug-hurd mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-hurd

Reply via email to