branches/zip: When assigning lock->recursive = FALSE, also flag

lock->writer_thread invalid, so that Valgrind will catch more errors.
This is related to Issue #175.
This commit is contained in:
marko 2009-02-17 12:59:54 +00:00
parent a5d1b1cee7
commit a5304a28a8

View file

@ -574,6 +574,8 @@ rw_lock_x_unlock_func(
if (lock->lock_word == 0) {
/* Last caller in a possible recursive chain. */
lock->recursive = FALSE;
UNIV_MEM_INVALID(&lock->writer_thread,
sizeof lock->writer_thread);
}
#ifdef UNIV_SYNC_DEBUG
@ -618,6 +620,8 @@ rw_lock_x_unlock_direct(
if (lock->lock_word == 0) {
lock->recursive = FALSE;
UNIV_MEM_INVALID(&lock->writer_thread,
sizeof lock->writer_thread);
}
lock->lock_word += X_LOCK_DECR;