Revision 72cf2d4f hw/xen_backend.c

b/hw/xen_backend.c
48 48
const char *xen_protocol;
49 49

  
50 50
/* private */
51
static TAILQ_HEAD(XenDeviceHead, XenDevice) xendevs = TAILQ_HEAD_INITIALIZER(xendevs);
51
static QTAILQ_HEAD(XenDeviceHead, XenDevice) xendevs = QTAILQ_HEAD_INITIALIZER(xendevs);
52 52
static int debug = 0;
53 53

  
54 54
/* ------------------------------------------------------------- */
......
165 165
{
166 166
    struct XenDevice *xendev;
167 167

  
168
    TAILQ_FOREACH(xendev, &xendevs, next) {
168
    QTAILQ_FOREACH(xendev, &xendevs, next) {
169 169
	if (xendev->dom != dom)
170 170
	    continue;
171 171
	if (xendev->dev != dev)
......
227 227
	xendev->gnttabdev = -1;
228 228
    }
229 229

  
230
    TAILQ_INSERT_TAIL(&xendevs, xendev, next);
230
    QTAILQ_INSERT_TAIL(&xendevs, xendev, next);
231 231

  
232 232
    if (xendev->ops->alloc)
233 233
	xendev->ops->alloc(xendev);
......
243 243
    struct XenDevice *xendev, *xnext;
244 244

  
245 245
    /*
246
     * This is pretty much like TAILQ_FOREACH(xendev, &xendevs, next) but
246
     * This is pretty much like QTAILQ_FOREACH(xendev, &xendevs, next) but
247 247
     * we save the next pointer in xnext because we might free xendev.
248 248
     */
249 249
    xnext = xendevs.tqh_first;
......
271 271
	if (xendev->gnttabdev >= 0)
272 272
	    xc_gnttab_close(xendev->gnttabdev);
273 273

  
274
	TAILQ_REMOVE(&xendevs, xendev, next);
274
	QTAILQ_REMOVE(&xendevs, xendev, next);
275 275
	qemu_free(xendev);
276 276
    }
277 277
    return NULL;

Also available in: Unified diff