X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Fmutex.h;h=18f9039227e1feb19e7860811e7487a2338dfd9a;hb=e0b72720ebf599e67dd0fd793cdaf83be62db567;hp=b73913450bc2ce5e150047254af6e83a2fbb0839;hpb=a1d6fa071280123f282c1bac3b68008672401024;p=libs%2Fcore.git diff --git a/source/core/mutex.h b/source/core/mutex.h index b739134..18f9039 100644 --- a/source/core/mutex.h +++ b/source/core/mutex.h @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmspcore -Copyright © 2006 Mikko Rasa, Mikkosoft Productions -Distributed under the LGPL -*/ - #ifndef MSP_CORE_MUTEX_H_ #define MSP_CORE_MUTEX_H_ @@ -77,31 +70,6 @@ private: T *data; }; -/*template -class MutexPtr: public RefCount -{ -public: - MutexPtr(T *d, Mutex &m): mutex(m), data(d) { mutex.lock(); } - MutexPtr(const MutexPtr &p): RefCount(p), mutex(p.mutex), data(p.data) { } - T &operator*() const { return *data; } - T *operator->() const { return data; } - void clear() { decref(); data = 0; } - ~MutexPtr() { decref(); } -protected: - Mutex &mutex; - T *data; - - bool decref() - { - if(!RefCount::decref()) - { - mutex.unlock(); - return false; - } - return true; - } -};*/ - } #endif