From ccc55937cfc23b5ecca7f6b2427f906f8413ca4e Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Mon, 26 Jan 2015 00:28:46 +0300 Subject: [PATCH] evthread: evthreadimpl_disable_lock_debugging_() for libevent_global_shutdown() --- evthread-internal.h | 2 ++ evthread.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/evthread-internal.h b/evthread-internal.h index 45e178f2..16adf167 100644 --- a/evthread-internal.h +++ b/evthread-internal.h @@ -380,6 +380,8 @@ int evutil_secure_rng_global_setup_locks_(const int enable_locks); struct evthread_lock_callbacks *evthread_get_lock_callbacks(); /** Return current evthread_condition_callbacks */ struct evthread_condition_callbacks *evthread_get_condition_callbacks(); +/** Disable locking for internal usage (like global shutdown) */ +void evthreadimpl_disable_lock_debugging_(void); #endif diff --git a/evthread.c b/evthread.c index 40933626..02dab7a8 100644 --- a/evthread.c +++ b/evthread.c @@ -79,6 +79,10 @@ struct evthread_condition_callbacks *evthread_get_condition_callbacks() return evthread_lock_debugging_enabled_ ? &original_cond_fns_ : &evthread_cond_fns_; } +void evthreadimpl_disable_lock_debugging_(void) +{ + evthread_lock_debugging_enabled_ = 0; +} int evthread_set_lock_callbacks(const struct evthread_lock_callbacks *cbs) -- 2.40.0