Revision 81699d8a hw/qdev.h
b/hw/qdev.h | ||
---|---|---|
173 | 173 |
|
174 | 174 |
/*** BUS API. ***/ |
175 | 175 |
|
176 |
/* Returns 0 to walk children, > 0 to skip walk, < 0 to terminate walk. */ |
|
177 |
typedef int (qbus_walkerfn)(BusState *bus, void *opaque); |
|
178 |
typedef int (qdev_walkerfn)(DeviceState *dev, void *opaque); |
|
179 |
|
|
176 | 180 |
void qbus_create_inplace(BusState *bus, BusInfo *info, |
177 | 181 |
DeviceState *parent, const char *name); |
178 | 182 |
BusState *qbus_create(BusInfo *info, DeviceState *parent, const char *name); |
183 |
/* Returns > 0 if either devfn or busfn skip walk somewhere in cursion, |
|
184 |
* < 0 if either devfn or busfn terminate walk somewhere in cursion, |
|
185 |
* 0 otherwise. */ |
|
186 |
int qbus_walk_children(BusState *bus, qdev_walkerfn *devfn, |
|
187 |
qbus_walkerfn *busfn, void *opaque); |
|
188 |
int qdev_walk_children(DeviceState *dev, qdev_walkerfn *devfn, |
|
189 |
qbus_walkerfn *busfn, void *opaque); |
|
179 | 190 |
void qbus_free(BusState *bus); |
180 | 191 |
|
181 | 192 |
#define FROM_QBUS(type, dev) DO_UPCAST(type, qbus, dev) |
Also available in: Unified diff