summaryrefslogtreecommitdiffhomepage
path: root/faceapi/mutex.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-03-22 21:48:15 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-03-22 21:48:15 +0100
commit4f00c4c74d213a37a4b1a3313e50ce2b4dd51271 (patch)
treef692743cb752c994c05fe2761f83af08aa28d239 /faceapi/mutex.h
parent5c5ec4b4238996770bfd74ddfc87934ace40bf0f (diff)
finish rename
Diffstat (limited to 'faceapi/mutex.h')
-rw-r--r--faceapi/mutex.h44
1 files changed, 0 insertions, 44 deletions
diff --git a/faceapi/mutex.h b/faceapi/mutex.h
deleted file mode 100644
index 11aabafc..00000000
--- a/faceapi/mutex.h
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef SM_API_TESTAPPCONSOLE_MUTEX_H
-#define SM_API_TESTAPPCONSOLE_MUTEX_H
-
-namespace sm
-{
- namespace faceapi
- {
- namespace samplecode
- {
- // A very simple mutex class for sample code purposes.
- // It is recommended that you use the boost threads library.
- class Mutex
- {
- public:
- Mutex()
- {
- if (!InitializeCriticalSectionAndSpinCount(&_cs,0x80000400))
- {
- throw std::runtime_error("Failed to initialize Mutex");
- }
- }
- ~Mutex()
- {
- DeleteCriticalSection(&_cs);
- }
- void lock() const
- {
- EnterCriticalSection(&_cs);
- }
- void unlock() const
- {
- LeaveCriticalSection(&_cs);
- }
- private:
- // Noncopyable
- Mutex(const Mutex &);
- Mutex &operator=(const Mutex &);
- private:
- mutable CRITICAL_SECTION _cs;
- };
- }
- }
-}
-#endif