search for: gl_rwlock_unlock

Displaying 1 result from an estimated 1 matches for "gl_rwlock_unlock".

Did you mean: gl_lock_unlock
2014 May 29
2
[PATCH] library: per-handle locking support
...gl_rwlock_wrlock (locks_lock); + + n_handles++; + per_handle_locks = realloc (per_handle_locks, + sizeof (*per_handle_locks) * n_handles); + handles = realloc (handles, sizeof (*handles) * n_handles); + + gl_lock_init (per_handle_locks[n_handles - 1]); + handles[n_handles - 1] = g; + + gl_rwlock_unlock (locks_lock); +} + +static void +___shrink_lock_arrays (void) +{ + // locks_lock should be held + + int i; + guestfs___lookup_lock_or_abort (NULL, &i); + + memmove (handles + i, handles + i + 1, (n_handles - i - 1) + * sizeof (*handles)); + memmove (per_handle_locks + i, per_handle_lo...