aboutsummaryrefslogtreecommitdiffstats
path: root/Attic/mutex/noop_mutex/mux_noop.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-07-03 04:45:58 +0000
committerlloyd <[email protected]>2009-07-03 04:45:58 +0000
commit7f715b77711f55d9e30f232ff32001fe9e375a56 (patch)
tree9fadcc95fb28df92b775c6f235a78867e422ebcc /Attic/mutex/noop_mutex/mux_noop.cpp
parent9de911f55808e84e8d14efbecf8379c25afb9d50 (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.cpp50
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;
- }
-
-}