Commit a5304a28 authored by marko's avatar marko

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.
parent a5d1b1ce
...@@ -574,6 +574,8 @@ rw_lock_x_unlock_func( ...@@ -574,6 +574,8 @@ rw_lock_x_unlock_func(
if (lock->lock_word == 0) { if (lock->lock_word == 0) {
/* Last caller in a possible recursive chain. */ /* Last caller in a possible recursive chain. */
lock->recursive = FALSE; lock->recursive = FALSE;
UNIV_MEM_INVALID(&lock->writer_thread,
sizeof lock->writer_thread);
} }
#ifdef UNIV_SYNC_DEBUG #ifdef UNIV_SYNC_DEBUG
...@@ -618,6 +620,8 @@ rw_lock_x_unlock_direct( ...@@ -618,6 +620,8 @@ rw_lock_x_unlock_direct(
if (lock->lock_word == 0) { if (lock->lock_word == 0) {
lock->recursive = FALSE; lock->recursive = FALSE;
UNIV_MEM_INVALID(&lock->writer_thread,
sizeof lock->writer_thread);
} }
lock->lock_word += X_LOCK_DECR; lock->lock_word += X_LOCK_DECR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment