[Libguestfs] [PATCH 2/5] threads: Acquire and release the lock around each public guestfs_* API.

Richard W.M. Jones rjones at redhat.com
Tue Jun 16 14:19:16 UTC 2015


On Thu, Jun 11, 2015 at 03:13:23PM +0200, Pino Toscano wrote:
> (picking this because it is the first ACQUIRE_LOCK ... RELEASE_LOCK
> pattern in the patch)
> there could be an extra macro to do a "stack lock", using the cleanup
> attribute we use already; something like:

Yeah, very good idea!

> This would have the drawback of requiring __attribute__((cleanup)) to
> work, although that could mean we could drop the code handling its
> lack.

Wonder if anyone cares about non-gcc/non-clang.  systemd uses
__attribute__((cleanup)) extensively too, so eventually Lennart will
force it to be added the next C standard :-)

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




More information about the Libguestfs mailing list