mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -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
|
@ -9,6 +9,8 @@
|
|||
|
||||
#define TYPE_PR_MANAGER "pr-manager"
|
||||
|
||||
typedef struct PRManager PRManager;
|
||||
typedef struct PRManagerClass PRManagerClass;
|
||||
#define PR_MANAGER_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(PRManagerClass, (klass), TYPE_PR_MANAGER)
|
||||
#define PR_MANAGER_GET_CLASS(obj) \
|
||||
|
@ -18,24 +20,24 @@
|
|||
|
||||
struct sg_io_hdr;
|
||||
|
||||
typedef struct PRManager {
|
||||
struct PRManager {
|
||||
/* <private> */
|
||||
Object parent;
|
||||
} PRManager;
|
||||
};
|
||||
|
||||
/**
|
||||
* PRManagerClass:
|
||||
* @parent_class: the base class
|
||||
* @run: callback invoked in thread pool context
|
||||
*/
|
||||
typedef struct PRManagerClass {
|
||||
struct PRManagerClass {
|
||||
/* <private> */
|
||||
ObjectClass parent_class;
|
||||
|
||||
/* <public> */
|
||||
int (*run)(PRManager *pr_mgr, int fd, struct sg_io_hdr *hdr);
|
||||
bool (*is_connected)(PRManager *pr_mgr);
|
||||
} PRManagerClass;
|
||||
};
|
||||
|
||||
bool pr_manager_is_connected(PRManager *pr_mgr);
|
||||
int coroutine_fn pr_manager_execute(PRManager *pr_mgr, AioContext *ctx, int fd,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue