From b1fdd325ac311f299eedcd6725a56cc1e8d311a8 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Sat, 12 Sep 2015 14:28:52 +0300 Subject: [PATCH] Allowed to pass mutex by reference into STG_LOCKER. --- include/stg/locker.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/stg/locker.h b/include/stg/locker.h index fe1014d7..964f17cb 100644 --- a/include/stg/locker.h +++ b/include/stg/locker.h @@ -34,6 +34,11 @@ class STG_LOCKER { public: + STG_LOCKER(pthread_mutex_t& m) + : mutex(&m) + { + pthread_mutex_lock(mutex); + } STG_LOCKER(pthread_mutex_t * m) : mutex(m) { -- 2.43.2