mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
Move QEMU driver lock helpers to a separate file
To allow their use from other source files, move qemuDriverLock and qemuDriverUnlock to qemu_conf.h and make them non-static * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Add qemuDriverLock qemuDriverUnlock * src/qemu/qemu_driver.c: Remove qemuDriverLock and qemuDriverUnlock
This commit is contained in:
parent
01abc8a1b8
commit
22f4cb855c
@ -60,6 +60,16 @@
|
||||
|
||||
#define VIR_FROM_THIS VIR_FROM_QEMU
|
||||
|
||||
void qemuDriverLock(struct qemud_driver *driver)
|
||||
{
|
||||
virMutexLock(&driver->lock);
|
||||
}
|
||||
void qemuDriverUnlock(struct qemud_driver *driver)
|
||||
{
|
||||
virMutexUnlock(&driver->lock);
|
||||
}
|
||||
|
||||
|
||||
int qemudLoadDriverConfig(struct qemud_driver *driver,
|
||||
const char *filename) {
|
||||
virConfPtr conf;
|
||||
|
@ -150,6 +150,8 @@ struct _qemuDomainCmdlineDef {
|
||||
__FUNCTION__, __LINE__, __VA_ARGS__)
|
||||
|
||||
|
||||
void qemuDriverLock(struct qemud_driver *driver);
|
||||
void qemuDriverUnlock(struct qemud_driver *driver);
|
||||
int qemudLoadDriverConfig(struct qemud_driver *driver,
|
||||
const char *filename);
|
||||
|
||||
|
@ -109,15 +109,6 @@ static void processWatchdogEvent(void *data, void *opaque);
|
||||
|
||||
static int qemudShutdown(void);
|
||||
|
||||
static void qemuDriverLock(struct qemud_driver *driver)
|
||||
{
|
||||
virMutexLock(&driver->lock);
|
||||
}
|
||||
static void qemuDriverUnlock(struct qemud_driver *driver)
|
||||
{
|
||||
virMutexUnlock(&driver->lock);
|
||||
}
|
||||
|
||||
static void qemuDomainEventFlush(int timer, void *opaque);
|
||||
static void qemuDomainEventQueue(struct qemud_driver *driver,
|
||||
virDomainEventPtr event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user