On Thu, May 29, 2014 at 12:21:39PM +0200, Maros Zatko wrote:
> Introduces private pool of muteces (per_handle_locks) guarded by read-write
> mutex (locks_lock) using guestfs__per_handle_lock_lock(g) and
> guestfs__per_handle_lock_unlock(g), where g is current valid guestfs_h handle.
> Above two are used in generator/c.ml at begin and end of each non-deamon call.
> 
> New lock can be created using guestfs__per_handle_lock_add(g) and
> destroyed with guestfs__per_handle_lock_remove(g). These two are called
> automatically too. First one is called by guestfs_create and second by
> guestfs_destroy.

I'm a bit confused about why there is a pool of locks.  Why not keep
the lock struct in the handle (guestfs_h)?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

_______________________________________________
Libguestfs mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to