]> granicus.if.org Git - libevent/commitdiff
evthread: evthreadimpl_disable_lock_debugging_() for libevent_global_shutdown()
authorAzat Khuzhin <a3at.mail@gmail.com>
Sun, 25 Jan 2015 21:28:46 +0000 (00:28 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Sun, 25 Jan 2015 21:40:09 +0000 (00:40 +0300)
evthread-internal.h
evthread.c

index 45e178f2ae89ea6ff4eec23d9c361fd7604b6ab7..16adf167d2e5bf7e40012aa9a1dc8a76b970d15e 100644 (file)
@@ -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
 
index 409336264647570819519221b3d57f593a1b216a..02dab7a8057e58f0fe64b0175ed016635d442eec 100644 (file)
@@ -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)