tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: UVM typedef struct
On Wed, 12 Aug 2009, Tonnerre LOMBARD wrote:
> I recently encountered a problem extending an api_t and have a
> question:
>
> - bla_t contains a list of references to blubb_t
> - blubb_t contains a pointer back to bla_t
>
> How would that ever work?
Oh, you can work that something like this
typedef struct bla bla_t;
typedef struct bla * blaptr_t;
typedef struct blubb blubb_t;
typedef struct blubb * blubbptr_t;
struct bla {
blubb_t blubb;
blubb_t * blubbptr1;
blubbptr_t blubbptr2;
bla_t * blaptr1;
blaptr_t blaptr2;
};
struct blubb {
bla_t bla;
bla_t * blaptr1;
blaptr_t blaptr2;
blubb_t * blubbptr1;
blubbptr_t blubbptr2;
};
is that what you meant?
iain
Home |
Main Index |
Thread Index |
Old Index