Displaying 2 results from an estimated 2 matches for "_lock_err".
2015 Jun 06
0
[PATCH 2/5] threads: Acquire and release the lock around each public guestfs_* API.
...+58,40 @@
#define TRACE4(name, arg1, arg2, arg3, arg4)
#endif
+/* Debug per-handle locks. */
+//#define DEBUG_LOCK 1
+
+/* Acquire and release the per-handle lock. */
+#ifdef DEBUG_LOCK
+#include <errno.h>
+#define ACQUIRE_LOCK(g) do { \
+ int _lock_err = glthread_recursive_lock_lock (&(g)->lock); \
+ if (_lock_err == 0) { \
+ (g)->lock_count++; \
+ printf ("%s: %d: ACQUIRE_LOCK: lock count = %d\n",...
2015 Jun 06
7
[PATCH 0/5] Add support for thread-safe handle.
This patch isn't ready to go upstream. In fact, I think we might do a
quick 1.30 release soon, and save this patch, and also the extensive
changes proposed for the test suite[1], to after 1.30.
Currently it is not safe to use the same handle from multiple threads,
unless you implement your own mutexes. See:
http://libguestfs.org/guestfs.3.html#multiple-handles-and-multiple-threads
These