mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 08:43:55 -06:00
Move QOM typedefs and add missing includes
Some typedefs and macros are defined after the type check macros. This makes it difficult to automatically replace their definitions with OBJECT_DECLARE_TYPE. Patch generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=QOMStructTypedefSplit $(git grep -l '' -- '*.[ch]') which will split "typdef struct { ... } TypedefName" declarations. Followed by: $ ./scripts/codeconverter/converter.py -i --pattern=MoveSymbols \ $(git grep -l '' -- '*.[ch]') which will: - move the typedefs and #defines above the type check macros - add missing #include "qom/object.h" lines if necessary Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-9-ehabkost@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-Id: <20200831210740.126168-10-ehabkost@redhat.com> Message-Id: <20200831210740.126168-11-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
1c8eef0227
commit
db1015e92e
796 changed files with 3378 additions and 1823 deletions
|
@ -18,6 +18,7 @@
|
|||
#include "qemu/thread.h"
|
||||
#include "hw/qdev-core.h"
|
||||
#include "hw/s390x/sclp.h"
|
||||
#include "qom/object.h"
|
||||
|
||||
/* SCLP event types */
|
||||
#define SCLP_EVENT_OPRTNS_COMMAND 0x01
|
||||
|
@ -41,6 +42,8 @@
|
|||
#define SCLP_SELECTIVE_READ 0x01
|
||||
|
||||
#define TYPE_SCLP_EVENT "s390-sclp-event-type"
|
||||
typedef struct SCLPEvent SCLPEvent;
|
||||
typedef struct SCLPEventClass SCLPEventClass;
|
||||
#define SCLP_EVENT(obj) \
|
||||
OBJECT_CHECK(SCLPEvent, (obj), TYPE_SCLP_EVENT)
|
||||
#define SCLP_EVENT_CLASS(klass) \
|
||||
|
@ -169,13 +172,13 @@ typedef struct ReadEventData {
|
|||
};
|
||||
} QEMU_PACKED ReadEventData;
|
||||
|
||||
typedef struct SCLPEvent {
|
||||
struct SCLPEvent {
|
||||
DeviceState qdev;
|
||||
bool event_pending;
|
||||
char *name;
|
||||
} SCLPEvent;
|
||||
};
|
||||
|
||||
typedef struct SCLPEventClass {
|
||||
struct SCLPEventClass {
|
||||
DeviceClass parent_class;
|
||||
int (*init)(SCLPEvent *event);
|
||||
|
||||
|
@ -192,10 +195,11 @@ typedef struct SCLPEventClass {
|
|||
|
||||
/* can we handle this event type? */
|
||||
bool (*can_handle_event)(uint8_t type);
|
||||
} SCLPEventClass;
|
||||
};
|
||||
|
||||
#define TYPE_SCLP_EVENT_FACILITY "s390-sclp-event-facility"
|
||||
typedef struct SCLPEventFacility SCLPEventFacility;
|
||||
typedef struct SCLPEventFacilityClass SCLPEventFacilityClass;
|
||||
#define EVENT_FACILITY(obj) \
|
||||
OBJECT_CHECK(SCLPEventFacility, (obj), TYPE_SCLP_EVENT_FACILITY)
|
||||
#define EVENT_FACILITY_CLASS(klass) \
|
||||
|
@ -205,11 +209,11 @@ typedef struct SCLPEventFacility SCLPEventFacility;
|
|||
OBJECT_GET_CLASS(SCLPEventFacilityClass, (obj), \
|
||||
TYPE_SCLP_EVENT_FACILITY)
|
||||
|
||||
typedef struct SCLPEventFacilityClass {
|
||||
struct SCLPEventFacilityClass {
|
||||
SysBusDeviceClass parent_class;
|
||||
void (*command_handler)(SCLPEventFacility *ef, SCCB *sccb, uint64_t code);
|
||||
bool (*event_pending)(SCLPEventFacility *ef);
|
||||
} SCLPEventFacilityClass;
|
||||
};
|
||||
|
||||
BusState *sclp_get_event_facility_bus(void);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue