X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/dda964a76b486001f0debf38deb594ad7c13f416..b1fdd325ac311f299eedcd6725a56cc1e8d311a8:/include/stg/locker.h?ds=sidebyside 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) {