rwlock writelock checking.

git-svn-id: file:///svn/unbound/trunk@167 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2007-03-09 09:01:03 +00:00
parent 78ab5f41d7
commit 138aa8eebc
3 changed files with 30 additions and 10 deletions
+2 -1
View File
@@ -61,7 +61,6 @@
* o Uses a lot of memory.
* o The checks use locks themselves, changing scheduling,
* thus changing what races you see.
* o for rwlocks does not detect exclusive writelock, or double locking.
*/
#ifdef USE_THREAD_DEBUG
@@ -141,6 +140,8 @@ struct checked_lock {
int holder_line;
/** who owns the lock now */
struct thr_check* holder;
/** for rwlocks, the writelock holder */
struct thr_check* writeholder;
/** next lock a thread is holding (less recent) */
struct checked_lock* next_held_lock[THRDEBUG_MAX_THREADS];