diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2009-11-26 15:33:49 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-12-03 09:41:36 -0600 |
commit | 9af99d980e9ff6270f291b11a064087b33dd3ab8 (patch) | |
tree | b0ac0266b94e7024c904973dddf84b51ca14b4ec /hw/scsi.h | |
parent | 4c41d2ef5f599372a35d446fb75898fe9841bda4 (diff) |
scsi: move request lists to QTAILQ.
Changes:
* Move from open-coded lists to QTAILQ macros.
* Move the struct elements to the common data structures
(SCSIDevice + SCSIRequest).
* Drop free request pools.
* Fix request cleanup in the destroy callback.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/scsi.h')
-rw-r--r-- | hw/scsi.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -21,6 +21,7 @@ typedef struct SCSIRequest { SCSIDevice *dev; uint32_t tag; BlockDriverAIOCB *aiocb; + QTAILQ_ENTRY(SCSIRequest) next; } SCSIRequest; struct SCSIDevice @@ -28,6 +29,7 @@ struct SCSIDevice DeviceState qdev; uint32_t id; SCSIDeviceInfo *info; + QTAILQ_HEAD(, SCSIRequest) requests; }; /* cdrom.c */ |