diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2013-02-04 10:57:50 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2013-03-01 13:53:10 +0100 |
commit | fd7f0d66177ec1058a2a256856ff38fc9ceae5af (patch) | |
tree | 0e98bd491df2916b0c435c5822e91bf36883f051 | |
parent | 159b6e9f144c7afdf3ad95c29d1fede9626fa8b1 (diff) | |
download | qemu-fd7f0d66177ec1058a2a256856ff38fc9ceae5af.tar.gz qemu-fd7f0d66177ec1058a2a256856ff38fc9ceae5af.tar.bz2 qemu-fd7f0d66177ec1058a2a256856ff38fc9ceae5af.zip |
hw: move fifo.[ch] to libqemuutil
fifo.c is generic code that can be easily unit tested. So it
belongs in libqemuutil.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | hw/Makefile.objs | 1 | ||||
-rw-r--r-- | hw/xilinx_spi.c | 2 | ||||
-rw-r--r-- | hw/xilinx_spips.c | 2 | ||||
-rw-r--r-- | include/migration/vmstate.h | 2 | ||||
-rw-r--r-- | include/qemu/fifo8.h (renamed from hw/fifo.h) | 2 | ||||
-rw-r--r-- | util/Makefile.objs | 1 | ||||
-rw-r--r-- | util/fifo8.c (renamed from hw/fifo.c) | 3 |
7 files changed, 8 insertions, 5 deletions
diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 5750332f54..6e2275b842 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -44,7 +44,6 @@ common-obj-$(CONFIG_SMARTCARD_NSS) += ccid-card-emulated.o endif common-obj-$(CONFIG_I8259) += i8259_common.o i8259.o common-obj-$(CONFIG_SDHCI) += sdhci.o -common-obj-y += fifo.o common-obj-y += pam.o # PPC devices diff --git a/hw/xilinx_spi.c b/hw/xilinx_spi.c index be581c2ac5..e73c9bd79b 100644 --- a/hw/xilinx_spi.c +++ b/hw/xilinx_spi.c @@ -27,7 +27,7 @@ #include "sysbus.h" #include "sysemu/sysemu.h" #include "qemu/log.h" -#include "fifo.h" +#include "qemu/fifo8.h" #include "ssi.h" diff --git a/hw/xilinx_spips.c b/hw/xilinx_spips.c index 42e019dc05..915eb96a48 100644 --- a/hw/xilinx_spips.c +++ b/hw/xilinx_spips.c @@ -26,7 +26,7 @@ #include "sysemu/sysemu.h" #include "ptimer.h" #include "qemu/log.h" -#include "fifo.h" +#include "qemu/fifo8.h" #include "ssi.h" #include "qemu/bitops.h" diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index f27276c2d8..94a409b708 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -26,6 +26,8 @@ #ifndef QEMU_VMSTATE_H #define QEMU_VMSTATE_H 1 +#include <migration/qemu-file.h> + typedef void SaveStateHandler(QEMUFile *f, void *opaque); typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id); diff --git a/hw/fifo.h b/include/qemu/fifo8.h index f23890abf4..d318f71e11 100644 --- a/hw/fifo.h +++ b/include/qemu/fifo8.h @@ -1,7 +1,7 @@ #ifndef FIFO_H #define FIFO_H -#include "hw.h" +#include "migration/vmstate.h" typedef struct { /* All fields are private */ diff --git a/util/Makefile.objs b/util/Makefile.objs index 495a178557..cad5ce87db 100644 --- a/util/Makefile.objs +++ b/util/Makefile.objs @@ -3,6 +3,7 @@ util-obj-$(CONFIG_WIN32) += oslib-win32.o qemu-thread-win32.o event_notifier-win util-obj-$(CONFIG_POSIX) += oslib-posix.o qemu-thread-posix.o event_notifier-posix.o util-obj-y += envlist.o path.o host-utils.o cache-utils.o module.o util-obj-y += bitmap.o bitops.o hbitmap.o +util-obj-y += fifo8.o util-obj-y += acl.o util-obj-y += error.o qemu-error.o util-obj-$(CONFIG_POSIX) += compatfd.o diff --git a/hw/fifo.c b/util/fifo8.c index 68a955a77b..013e903c6e 100644 --- a/hw/fifo.c +++ b/util/fifo8.c @@ -12,7 +12,8 @@ * with this program; if not, see <http://www.gnu.org/licenses/>. */ -#include "fifo.h" +#include "qemu-common.h" +#include "qemu/fifo8.h" void fifo8_create(Fifo8 *fifo, uint32_t capacity) { |