Skip to content

Commit

Permalink
aio / timers: Untangle include files
Browse files Browse the repository at this point in the history
include/qemu/timer.h has no need to include main-loop.h and
doing so causes an issue for the next patch. Unfortunately
various files assume including timers.h will pull in main-loop.h.
Untangle this mess.

Signed-off-by: Alex Bligh <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
  • Loading branch information
abligh authored and stefanhaRH committed Aug 22, 2013
1 parent ff83c66 commit 6a1751b
Show file tree
Hide file tree
Showing 36 changed files with 39 additions and 4 deletions.
1 change: 1 addition & 0 deletions dma-helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "trace.h"
#include "qemu/range.h"
#include "qemu/thread.h"
#include "qemu/main-loop.h"

/* #define DEBUG_IOMMU */

Expand Down
1 change: 1 addition & 0 deletions hw/dma/xilinx_axidma.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "hw/ptimer.h"
#include "qemu/log.h"
#include "qapi/qmp/qerror.h"
#include "qemu/main-loop.h"

#include "hw/stream.h"

Expand Down
1 change: 1 addition & 0 deletions hw/timer/arm_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "qemu-common.h"
#include "hw/qdev.h"
#include "hw/ptimer.h"
#include "qemu/main-loop.h"

/* Common timer implementation. */

Expand Down
1 change: 1 addition & 0 deletions hw/timer/exynos4210_mct.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@

#include "hw/sysbus.h"
#include "qemu/timer.h"
#include "qemu/main-loop.h"
#include "qemu-common.h"
#include "hw/ptimer.h"

Expand Down
1 change: 1 addition & 0 deletions hw/timer/exynos4210_pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "hw/sysbus.h"
#include "qemu/timer.h"
#include "qemu-common.h"
#include "qemu/main-loop.h"
#include "hw/ptimer.h"

#include "hw/arm/exynos4210.h"
Expand Down
2 changes: 2 additions & 0 deletions hw/timer/grlib_gptimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include "hw/sysbus.h"
#include "qemu/timer.h"
#include "hw/ptimer.h"
#include "qemu/timer.h"
#include "qemu/main-loop.h"

#include "trace.h"

Expand Down
1 change: 1 addition & 0 deletions hw/timer/imx_epit.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "hw/ptimer.h"
#include "hw/sysbus.h"
#include "hw/arm/imx.h"
#include "qemu/main-loop.h"

#define TYPE_IMX_EPIT "imx.epit"

Expand Down
1 change: 1 addition & 0 deletions hw/timer/imx_gpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "hw/ptimer.h"
#include "hw/sysbus.h"
#include "hw/arm/imx.h"
#include "qemu/main-loop.h"

#define TYPE_IMX_GPT "imx.gpt"

Expand Down
1 change: 1 addition & 0 deletions hw/timer/lm32_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "qemu/timer.h"
#include "hw/ptimer.h"
#include "qemu/error-report.h"
#include "qemu/main-loop.h"

#define DEFAULT_FREQUENCY (50*1000000)

Expand Down
1 change: 1 addition & 0 deletions hw/timer/puv3_ost.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*/
#include "hw/sysbus.h"
#include "hw/ptimer.h"
#include "qemu/main-loop.h"

#undef DEBUG_PUV3
#include "hw/unicore32/puv3.h"
Expand Down
1 change: 1 addition & 0 deletions hw/timer/sh_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "hw/hw.h"
#include "hw/sh4/sh.h"
#include "qemu/timer.h"
#include "qemu/main-loop.h"
#include "exec/address-spaces.h"
#include "hw/ptimer.h"

Expand Down
1 change: 1 addition & 0 deletions hw/timer/slavio_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "hw/ptimer.h"
#include "hw/sysbus.h"
#include "trace.h"
#include "qemu/main-loop.h"

/*
* Registers of hardware timer in sun4m.
Expand Down
1 change: 1 addition & 0 deletions hw/timer/xilinx_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "hw/sysbus.h"
#include "hw/ptimer.h"
#include "qemu/log.h"
#include "qemu/main-loop.h"

#define D(x)

Expand Down
1 change: 1 addition & 0 deletions hw/tpm/tpm_tis.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "hw/pci/pci_ids.h"
#include "tpm_tis.h"
#include "qemu-common.h"
#include "qemu/main-loop.h"

/*#define DEBUG_TIS */

Expand Down
1 change: 1 addition & 0 deletions hw/usb/hcd-uhci.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "qemu/iov.h"
#include "sysemu/dma.h"
#include "trace.h"
#include "qemu/main-loop.h"

//#define DEBUG
//#define DEBUG_DUMP_DATA
Expand Down
5 changes: 3 additions & 2 deletions include/block/aio.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#ifndef QEMU_AIO_H
#define QEMU_AIO_H

#include "qemu/typedefs.h"
#include "qemu-common.h"
#include "qemu/queue.h"
#include "qemu/event_notifier.h"
Expand Down Expand Up @@ -42,7 +43,7 @@ typedef struct AioHandler AioHandler;
typedef void QEMUBHFunc(void *opaque);
typedef void IOHandler(void *opaque);

typedef struct AioContext {
struct AioContext {
GSource source;

/* The list of registered AIO handlers */
Expand Down Expand Up @@ -72,7 +73,7 @@ typedef struct AioContext {

/* Thread pool for performing work and receiving completion callbacks */
struct ThreadPool *thread_pool;
} AioContext;
};

/**
* aio_context_new: Allocate a new AioContext.
Expand Down
1 change: 1 addition & 0 deletions include/block/block_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "monitor/monitor.h"
#include "qemu/hbitmap.h"
#include "block/snapshot.h"
#include "qemu/main-loop.h"

#define BLOCK_FLAG_ENCRYPT 1
#define BLOCK_FLAG_COMPAT6 4
Expand Down
1 change: 1 addition & 0 deletions include/block/coroutine.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define QEMU_COROUTINE_H

#include <stdbool.h>
#include "qemu/typedefs.h"
#include "qemu/queue.h"
#include "qemu/timer.h"

Expand Down
1 change: 0 additions & 1 deletion include/qemu/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include "qemu/typedefs.h"
#include "qemu-common.h"
#include "qemu/main-loop.h"
#include "qemu/notify.h"

/* timers */
Expand Down
2 changes: 2 additions & 0 deletions include/qemu/typedefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ typedef struct QEMUTimer QEMUTimer;
typedef struct QEMUFile QEMUFile;
typedef struct QEMUBH QEMUBH;

typedef struct AioContext AioContext;

struct Monitor;
typedef struct Monitor Monitor;
typedef struct MigrationParams MigrationParams;
Expand Down
1 change: 1 addition & 0 deletions migration-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#include "qemu-common.h"
#include "qemu/sockets.h"
#include "qemu/main-loop.h"
#include "migration/migration.h"
#include "migration/qemu-file.h"
#include "block/block.h"
Expand Down
1 change: 1 addition & 0 deletions migration-fd.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/

#include "qemu-common.h"
#include "qemu/main-loop.h"
#include "qemu/sockets.h"
#include "migration/migration.h"
#include "monitor/monitor.h"
Expand Down
1 change: 1 addition & 0 deletions migration-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "migration/migration.h"
#include "migration/qemu-file.h"
#include "block/block.h"
#include "qemu/main-loop.h"

//#define DEBUG_MIGRATION_TCP

Expand Down
1 change: 1 addition & 0 deletions migration-unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include "qemu-common.h"
#include "qemu/sockets.h"
#include "qemu/main-loop.h"
#include "migration/migration.h"
#include "migration/qemu-file.h"
#include "block/block.h"
Expand Down
1 change: 1 addition & 0 deletions migration.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/

#include "qemu-common.h"
#include "qemu/main-loop.h"
#include "migration/migration.h"
#include "monitor/monitor.h"
#include "migration/qemu-file.h"
Expand Down
1 change: 1 addition & 0 deletions nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

#include "qemu/sockets.h"
#include "qemu/queue.h"
#include "qemu/main-loop.h"

//#define DEBUG_NBD

Expand Down
1 change: 1 addition & 0 deletions net/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "qmp-commands.h"
#include "hw/qdev.h"
#include "qemu/iov.h"
#include "qemu/main-loop.h"
#include "qapi-visit.h"
#include "qapi/opts-visitor.h"
#include "qapi/dealloc-visitor.h"
Expand Down
1 change: 1 addition & 0 deletions net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "qemu/option.h"
#include "qemu/sockets.h"
#include "qemu/iov.h"
#include "qemu/main-loop.h"

typedef struct NetSocketState {
NetClientState nc;
Expand Down
1 change: 1 addition & 0 deletions qemu-coroutine-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "qemu/sockets.h"
#include "block/coroutine.h"
#include "qemu/iov.h"
#include "qemu/main-loop.h"

ssize_t coroutine_fn
qemu_co_sendv_recvv(int sockfd, struct iovec *iov, unsigned iov_cnt,
Expand Down
1 change: 1 addition & 0 deletions qemu-io-cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "qemu-io.h"
#include "block/block_int.h"
#include "qemu/main-loop.h"

#define CMD_NOFILE_OK 0x01

Expand Down
1 change: 1 addition & 0 deletions qemu-nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "qemu-common.h"
#include "block/block.h"
#include "block/nbd.h"
#include "qemu/main-loop.h"

#include <stdarg.h>
#include <stdio.h>
Expand Down
1 change: 1 addition & 0 deletions slirp/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <libslirp.h>

#include "monitor/monitor.h"
#include "qemu/main-loop.h"

#ifdef DEBUG
int slirp_debug = DBG_CALL|DBG_MISC|DBG_ERROR;
Expand Down
1 change: 1 addition & 0 deletions thread-pool.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "block/block_int.h"
#include "qemu/event_notifier.h"
#include "block/thread-pool.h"
#include "qemu/main-loop.h"

static void do_spawn_thread(ThreadPool *pool);

Expand Down
1 change: 1 addition & 0 deletions ui/vnc-auth-sasl.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ typedef struct VncStateSASL VncStateSASL;
typedef struct VncDisplaySASL VncDisplaySASL;

#include "qemu/acl.h"
#include "qemu/main-loop.h"

struct VncStateSASL {
sasl_conn_t *conn;
Expand Down
2 changes: 1 addition & 1 deletion ui/vnc-auth-vencrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*/

#include "vnc.h"

#include "qemu/main-loop.h"

static void start_auth_vencrypt_subauth(VncState *vs)
{
Expand Down
1 change: 1 addition & 0 deletions ui/vnc-ws.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*/

#include "vnc.h"
#include "qemu/main-loop.h"

#ifdef CONFIG_VNC_TLS
#include "qemu/sockets.h"
Expand Down

0 comments on commit 6a1751b

Please sign in to comment.