use epicsMutex for Mutex
Now non-copyable, wasn't before...
This commit is contained in:
@@ -15,19 +15,7 @@
|
||||
|
||||
namespace epics { namespace pvData {
|
||||
|
||||
class Mutex {
|
||||
public:
|
||||
Mutex() : id(epicsMutexCreate())
|
||||
{if(!id) throw std::bad_alloc();}
|
||||
~Mutex() { epicsMutexDestroy(id) ;}
|
||||
void lock(){
|
||||
if(epicsMutexLock(id)!=epicsMutexLockOK)
|
||||
throw std::logic_error("Failed to acquire Mutex");
|
||||
}
|
||||
void unlock(){epicsMutexUnlock(id);}
|
||||
private:
|
||||
epicsMutexId id;
|
||||
};
|
||||
typedef epicsMutex Mutex;
|
||||
|
||||
class Lock : private NoDefaultMethods {
|
||||
public:
|
||||
|
||||
@@ -64,7 +64,7 @@ public: // only used by this source module
|
||||
|
||||
Timer::Pvt::Pvt(String threadName,ThreadPriority priority)
|
||||
: timerList(),
|
||||
mutex(Mutex()),
|
||||
mutex(),
|
||||
waitForWork(false),
|
||||
waitForDone(false),
|
||||
alive(true),
|
||||
|
||||
Reference in New Issue
Block a user