mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Fix checklock testcode for linux threads on exit.
git-svn-id: file:///svn/unbound/trunk@3522 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
dd174820dc
commit
c585cbc2d9
2 changed files with 13 additions and 2 deletions
|
|
@ -1,3 +1,6 @@
|
|||
28 October 2015: Wouter
|
||||
- Fix checklock testcode for linux threads on exit.
|
||||
|
||||
27 October 2015: Wouter
|
||||
- isblank() compat implementation.
|
||||
- detect libexpat without xml_StopParser function.
|
||||
|
|
|
|||
|
|
@ -502,6 +502,8 @@ void
|
|||
checklock_rdlock(enum check_lock_type type, struct checked_lock* lock,
|
||||
const char* func, const char* file, int line)
|
||||
{
|
||||
if(key_deleted)
|
||||
return;
|
||||
|
||||
log_assert(type == check_lock_rwlock);
|
||||
checklock_lockit(type, lock, func, file, line,
|
||||
|
|
@ -520,6 +522,8 @@ void
|
|||
checklock_wrlock(enum check_lock_type type, struct checked_lock* lock,
|
||||
const char* func, const char* file, int line)
|
||||
{
|
||||
if(key_deleted)
|
||||
return;
|
||||
log_assert(type == check_lock_rwlock);
|
||||
checklock_lockit(type, lock, func, file, line,
|
||||
try_wr, timed_wr, &lock->u.rwlock, 0, 1);
|
||||
|
|
@ -555,6 +559,8 @@ void
|
|||
checklock_lock(enum check_lock_type type, struct checked_lock* lock,
|
||||
const char* func, const char* file, int line)
|
||||
{
|
||||
if(key_deleted)
|
||||
return;
|
||||
log_assert(type != check_lock_rwlock);
|
||||
switch(type) {
|
||||
case check_lock_mutex:
|
||||
|
|
@ -577,8 +583,10 @@ void
|
|||
checklock_unlock(enum check_lock_type type, struct checked_lock* lock,
|
||||
const char* func, const char* file, int line)
|
||||
{
|
||||
struct thr_check *thr = (struct thr_check*)pthread_getspecific(
|
||||
thr_debug_key);
|
||||
struct thr_check *thr;
|
||||
if(key_deleted)
|
||||
return;
|
||||
thr = (struct thr_check*)pthread_getspecific(thr_debug_key);
|
||||
checktype(type, lock, func, file, line);
|
||||
if(!thr) lock_error(lock, func, file, line, "no thread info");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue