Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Sep 1997 00:38:45 -0700
From:      John-Mark Gurney <gurney_j@efn.org>
To:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   how to put to structures in one memory area...
Message-ID:  <19970925003845.29319@hydrogen.nike.efn.org>

next in thread | raw e-mail | index | archive | help
well.. I was thinking about the design of the generic bus code.. and
wanted to have the generic structure, and then the private bus data...
what is the way that you guys suggest it be done?

struct bothstructs{
	struct generic;
	struct specific;
};

or

struct generic {
	union {
		struct busa *a;
		struct busb *b;
	}bus;
};

or

struct generic {
};

ISAPRIVATE(generic)->specific)

or would simply making two allocations be fine??  I don't like the idea
of splitting the specific bus data so far away from the generic when
it's likely that you will use both...

-- 
  John-Mark Gurney                          Modem/FAX: +1 541 683 6954
  Cu Networking

  Live in Peace, destroy Micro$oft, support free software, run FreeBSD



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19970925003845.29319>