use epicsMutex for Mutex

Now non-copyable, wasn't before...
This commit is contained in:
Michael Davidsaver
2011-03-02 17:20:15 -05:00
parent 4c88ef8e99
commit fa77eacd4e
2 changed files with 2 additions and 14 deletions

View File

@@ -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:

View File

@@ -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),