Re: [PATCH 10/12] libxl: Move driver lock/unlock to libxl_conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30.08.2013 23:46, Jim Fehlig wrote:
> Move the libxl driver lock/unlock functions from libxl_driver.c
> to libxl_conf.h so they can be used by other source files.
> 
> Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
> ---
>  src/libxl/libxl_conf.h   | 12 ++++++++++++
>  src/libxl/libxl_driver.c | 12 ------------
>  2 files changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h
> index 95e0983..174a759 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 7615cdd..8ece4c9 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)
> 

ACK

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]