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>
This commit is contained in:
parent
159b6e9f14
commit
fd7f0d6617
@ -44,7 +44,6 @@ common-obj-$(CONFIG_SMARTCARD_NSS) += ccid-card-emulated.o
|
|||||||
endif
|
endif
|
||||||
common-obj-$(CONFIG_I8259) += i8259_common.o i8259.o
|
common-obj-$(CONFIG_I8259) += i8259_common.o i8259.o
|
||||||
common-obj-$(CONFIG_SDHCI) += sdhci.o
|
common-obj-$(CONFIG_SDHCI) += sdhci.o
|
||||||
common-obj-y += fifo.o
|
|
||||||
common-obj-y += pam.o
|
common-obj-y += pam.o
|
||||||
|
|
||||||
# PPC devices
|
# PPC devices
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
#include "sysbus.h"
|
#include "sysbus.h"
|
||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "qemu/log.h"
|
#include "qemu/log.h"
|
||||||
#include "fifo.h"
|
#include "qemu/fifo8.h"
|
||||||
|
|
||||||
#include "ssi.h"
|
#include "ssi.h"
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include "sysemu/sysemu.h"
|
#include "sysemu/sysemu.h"
|
||||||
#include "ptimer.h"
|
#include "ptimer.h"
|
||||||
#include "qemu/log.h"
|
#include "qemu/log.h"
|
||||||
#include "fifo.h"
|
#include "qemu/fifo8.h"
|
||||||
#include "ssi.h"
|
#include "ssi.h"
|
||||||
#include "qemu/bitops.h"
|
#include "qemu/bitops.h"
|
||||||
|
|
||||||
|
@ -26,6 +26,8 @@
|
|||||||
#ifndef QEMU_VMSTATE_H
|
#ifndef QEMU_VMSTATE_H
|
||||||
#define QEMU_VMSTATE_H 1
|
#define QEMU_VMSTATE_H 1
|
||||||
|
|
||||||
|
#include <migration/qemu-file.h>
|
||||||
|
|
||||||
typedef void SaveStateHandler(QEMUFile *f, void *opaque);
|
typedef void SaveStateHandler(QEMUFile *f, void *opaque);
|
||||||
typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
|
typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id);
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#ifndef FIFO_H
|
#ifndef FIFO_H
|
||||||
#define FIFO_H
|
#define FIFO_H
|
||||||
|
|
||||||
#include "hw.h"
|
#include "migration/vmstate.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/* All fields are private */
|
/* All fields are private */
|
@ -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-$(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 += envlist.o path.o host-utils.o cache-utils.o module.o
|
||||||
util-obj-y += bitmap.o bitops.o hbitmap.o
|
util-obj-y += bitmap.o bitops.o hbitmap.o
|
||||||
|
util-obj-y += fifo8.o
|
||||||
util-obj-y += acl.o
|
util-obj-y += acl.o
|
||||||
util-obj-y += error.o qemu-error.o
|
util-obj-y += error.o qemu-error.o
|
||||||
util-obj-$(CONFIG_POSIX) += compatfd.o
|
util-obj-$(CONFIG_POSIX) += compatfd.o
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
* with this program; if not, see <http://www.gnu.org/licenses/>.
|
* 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)
|
void fifo8_create(Fifo8 *fifo, uint32_t capacity)
|
||||||
{
|
{
|
Loading…
x
Reference in New Issue
Block a user