@@ -75,6 +75,7 @@ struct held_lock {
75
75
struct lock_info * info ;
76
76
struct lock_context where ;
77
77
enum synch_type type ;
78
+ bool rwlock_wr :1 ;
78
79
};
79
80
80
81
static __thread struct held_lock held_stack [JEFFPC_LOCK_STACK_DEPTH ];
@@ -469,7 +470,8 @@ static void check_magic(struct lock_info *info, const char *op,
469
470
}
470
471
471
472
static void check_unheld_for_lock (struct lock_info * info ,
472
- const struct lock_context * where )
473
+ const struct lock_context * where ,
474
+ bool rwlock_wr )
473
475
{
474
476
#ifdef JEFFPC_LOCK_TRACKING
475
477
struct held_lock * held ;
@@ -500,6 +502,7 @@ static void check_unheld_for_lock(struct lock_info *info,
500
502
held -> info = info ;
501
503
held -> where = * where ;
502
504
held -> type = info -> type ;
505
+ held -> rwlock_wr = rwlock_wr ;
503
506
#endif
504
507
}
505
508
@@ -576,7 +579,7 @@ static void verify_lock_lock(const struct lock_context *where, struct lock *l)
576
579
print_invalid_call ("MXLOCK" , where );
577
580
578
581
check_magic (& l -> info , "acquire" , where , SYNCH_TYPE_MUTEX );
579
- check_unheld_for_lock (& l -> info , where );
582
+ check_unheld_for_lock (& l -> info , where , false );
580
583
}
581
584
582
585
static void verify_lock_unlock (const struct lock_context * where , struct lock * l )
@@ -622,7 +625,7 @@ static void verify_rw_lock(const struct lock_context *where, struct rwlock *l,
622
625
print_invalid_call ("RWLOCK" , where );
623
626
624
627
check_magic (& l -> info , "acquire" , where , SYNCH_TYPE_RW );
625
- check_unheld_for_lock (& l -> info , where );
628
+ check_unheld_for_lock (& l -> info , where , wr );
626
629
}
627
630
628
631
static void verify_rw_unlock (const struct lock_context * where , struct rwlock * l )
0 commit comments