]> git.stg.codes - stg.git/blobdiff - include/stg/locker.h
Fixed mutex locking.
[stg.git] / include / stg / locker.h
index fe1014d779093b94e277f0248f1fa997a12db621..964f17cb44d7ccc0a3b037fe4a940ee9552016c0 100644 (file)
 class STG_LOCKER
 {
 public:
+    STG_LOCKER(pthread_mutex_t& m)
+        : mutex(&m)
+        {
+        pthread_mutex_lock(mutex);
+        }
     STG_LOCKER(pthread_mutex_t * m)
         : mutex(m)
         {