diff options
author | lloyd <[email protected]> | 2009-07-03 04:45:58 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-07-03 04:45:58 +0000 |
commit | 7f715b77711f55d9e30f232ff32001fe9e375a56 (patch) | |
tree | 9fadcc95fb28df92b775c6f235a78867e422ebcc /Attic/mutex/noop_mutex/mux_noop.cpp | |
parent | 9de911f55808e84e8d14efbecf8379c25afb9d50 (diff) |
Move mutex from Attic to src to deal with merge conflict
Diffstat (limited to 'Attic/mutex/noop_mutex/mux_noop.cpp')
-rw-r--r-- | Attic/mutex/noop_mutex/mux_noop.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/Attic/mutex/noop_mutex/mux_noop.cpp b/Attic/mutex/noop_mutex/mux_noop.cpp deleted file mode 100644 index 5c45084fe..000000000 --- a/Attic/mutex/noop_mutex/mux_noop.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* -* No-Op Mutex Factory -* (C) 1999-2007 Jack Lloyd -* -* Distributed under the terms of the Botan license -*/ - -#include <botan/mux_noop.h> - -namespace Botan { - -/* -* No-Op Mutex Factory -*/ -Mutex* Noop_Mutex_Factory::make() - { - class Noop_Mutex : public Mutex - { - public: - class Mutex_State_Error : public Internal_Error - { - public: - Mutex_State_Error(const std::string& where) : - Internal_Error("Noop_Mutex::" + where + ": " + - "Mutex is already " + where + "ed") {} - }; - - void lock() - { - if(locked) - throw Mutex_State_Error("lock"); - locked = true; - } - - void unlock() - { - if(!locked) - throw Mutex_State_Error("unlock"); - locked = false; - } - - Noop_Mutex() { locked = false; } - private: - bool locked; - }; - - return new Noop_Mutex; - } - -} |