diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index 95e09832c4..174a759534 100644 --- a/src/libxl/libxl_conf.h +++ b/src/libxl/libxl_conf.h @@ -150,4 +150,16 @@ int libxlBuildDomainConfig(libxlDriverPrivatePtr driver, 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 */ diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 12d5ddc7c2..d5db8bbee5 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -77,18 +77,6 @@ static int libxlVmStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm, 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 */ static void libxlDomainEventQueue(libxlDriverPrivatePtr driver, virDomainEventPtr event)