diff --git a/src/venus/vkr_device.c b/src/venus/vkr_device.c index f79213b..37b2819 100644 --- a/src/venus/vkr_device.c +++ b/src/venus/vkr_device.c @@ -300,7 +300,7 @@ vkr_device_destroy(struct vkr_context *ctx, struct vkr_device *dev) } struct vkr_queue *queue, *queue_tmp; - LIST_FOR_EACH_ENTRY_SAFE (queue, queue_tmp, &dev->queues, head) + LIST_FOR_EACH_ENTRY_SAFE (queue, queue_tmp, &dev->queues, base.track_head) vkr_queue_destroy(ctx, queue); struct vkr_queue_sync *sync, *sync_tmp; diff --git a/src/venus/vkr_queue.c b/src/venus/vkr_queue.c index 922c81b..576028c 100644 --- a/src/venus/vkr_queue.c +++ b/src/venus/vkr_queue.c @@ -145,8 +145,8 @@ vkr_queue_destroy(struct vkr_context *ctx, struct vkr_queue *queue) mtx_destroy(&queue->mutex); cnd_destroy(&queue->cond); - list_del(&queue->head); list_del(&queue->busy_head); + list_del(&queue->base.track_head); util_hash_table_remove_u64(ctx->object_table, queue->base.id); } @@ -211,7 +211,7 @@ vkr_queue_create(struct vkr_context *ctx, struct vkr_queue *queue; int ret; - LIST_FOR_EACH_ENTRY (queue, &dev->queues, head) { + LIST_FOR_EACH_ENTRY (queue, &dev->queues, base.track_head) { if (queue->flags == flags && queue->family == family && queue->index == index) return queue; } @@ -256,10 +256,11 @@ vkr_queue_create(struct vkr_context *ctx, queue->eventfd = ctx->fence_eventfd; } - /* currently queues are not tracked as device objects */ - list_addtail(&queue->head, &dev->queues); list_inithead(&queue->busy_head); + /* queues are not tracked as device objects */ + list_addtail(&queue->base.track_head, &dev->queues); + util_hash_table_set_u64(ctx->object_table, queue->base.id, queue); return queue; diff --git a/src/venus/vkr_queue.h b/src/venus/vkr_queue.h index 926c54a..16e144d 100644 --- a/src/venus/vkr_queue.h +++ b/src/venus/vkr_queue.h @@ -51,7 +51,6 @@ struct vkr_queue { struct list_head pending_syncs; struct list_head signaled_syncs; - struct list_head head; struct list_head busy_head; };