From: Remi Gacogne Date: Tue, 28 Apr 2020 13:34:25 +0000 (+0200) Subject: Remove the now unused Lock class wrapping pthread_mutex_t objects X-Git-Tag: dnsdist-1.5.0-rc2~7^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51db390823fb87eefcca7f5d9bd5f4b60b2bcd35;p=thirdparty%2Fpdns.git Remove the now unused Lock class wrapping pthread_mutex_t objects --- diff --git a/pdns/lock.hh b/pdns/lock.hh index d3933059f5..7bd6112846 100644 --- a/pdns/lock.hh +++ b/pdns/lock.hh @@ -27,33 +27,6 @@ extern bool g_singleThreaded; -class Lock -{ - pthread_mutex_t *d_lock; -public: - Lock(const Lock& rhs) = delete; - Lock& operator=(const Lock& rhs) = delete; - - Lock(pthread_mutex_t *lock) : d_lock(lock) - { - if(g_singleThreaded) - return; - - int err; - if((err = pthread_mutex_lock(d_lock))) { - errno = err; - throw PDNSException("error acquiring lock: "+stringerror()); - } - } - ~Lock() - { - if(g_singleThreaded) - return; - - pthread_mutex_unlock(d_lock); - } -}; - class ReadWriteLock { public: