Re: [libvirt] [PATCH v2 16/24] network_conf: Introduce locked versions of lookup functions

2015-03-06 Thread Peter Krempa
On Thu, Mar 05, 2015 at 16:58:08 +0100, Peter Krempa wrote: > On Thu, Mar 05, 2015 at 12:05:17 +0100, Michal Privoznik wrote: > > This is going to be needed later, when some functions needs to avoid > > calling multiple times at once. It will work like this: > > > > 1) gain the object list mutex >

Re: [libvirt] [PATCH v2 16/24] network_conf: Introduce locked versions of lookup functions

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:17 +0100, Michal Privoznik wrote: > This is going to be needed later, when some functions needs to avoid > calling multiple times at once. It will work like this: > > 1) gain the object list mutex > 2) find the object to work on > 3) do the work > 4) release the mutex

Re: [libvirt] [PATCH v2 16/24] network_conf: Introduce locked versions of lookup functions

2015-03-05 Thread Peter Krempa
On Thu, Mar 05, 2015 at 12:05:17 +0100, Michal Privoznik wrote: > This is going to be needed later, when some functions needs to avoid > calling multiple times at once. It will work like this: > > 1) gain the object list mutex > 2) find the object to work on > 3) do the work > 4) release the mutex

[libvirt] [PATCH v2 16/24] network_conf: Introduce locked versions of lookup functions

2015-03-05 Thread Michal Privoznik
This is going to be needed later, when some functions needs to avoid calling multiple times at once. It will work like this: 1) gain the object list mutex 2) find the object to work on 3) do the work 4) release the mutex As an example of such function is virNetworkAssignDef(). The other use case