mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
libxl: Move driver lock/unlock to libxl_conf
Move the libxl driver lock/unlock functions from libxl_driver.c to libxl_conf.h so they can be used by other source files.
This commit is contained in:
parent
288fdcd06d
commit
cf735fe03c
@ -150,4 +150,16 @@ int
|
|||||||
libxlBuildDomainConfig(libxlDriverPrivatePtr driver,
|
libxlBuildDomainConfig(libxlDriverPrivatePtr driver,
|
||||||
virDomainObjPtr vm, libxl_domain_config *d_config);
|
virDomainObjPtr vm, libxl_domain_config *d_config);
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
libxlDriverLock(libxlDriverPrivatePtr driver)
|
||||||
|
{
|
||||||
|
virMutexLock(&driver->lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
libxlDriverUnlock(libxlDriverPrivatePtr driver)
|
||||||
|
{
|
||||||
|
virMutexUnlock(&driver->lock);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* LIBXL_CONF_H */
|
#endif /* LIBXL_CONF_H */
|
||||||
|
@ -77,18 +77,6 @@ static int
|
|||||||
libxlVmStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
|
libxlVmStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
|
||||||
bool start_paused, int restore_fd);
|
bool start_paused, int restore_fd);
|
||||||
|
|
||||||
static void
|
|
||||||
libxlDriverLock(libxlDriverPrivatePtr driver)
|
|
||||||
{
|
|
||||||
virMutexLock(&driver->lock);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
libxlDriverUnlock(libxlDriverPrivatePtr driver)
|
|
||||||
{
|
|
||||||
virMutexUnlock(&driver->lock);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* driver must be locked before calling */
|
/* driver must be locked before calling */
|
||||||
static void
|
static void
|
||||||
libxlDomainEventQueue(libxlDriverPrivatePtr driver, virDomainEventPtr event)
|
libxlDomainEventQueue(libxlDriverPrivatePtr driver, virDomainEventPtr event)
|
||||||
|
Loading…
Reference in New Issue
Block a user