]> git.tdb.fi Git - libs/core.git/blobdiff - source/semaphore.h
Rename to libmspcore
[libs/core.git] / source / semaphore.h
diff --git a/source/semaphore.h b/source/semaphore.h
deleted file mode 100644 (file)
index 36e9690..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-This file is part of libmspframework
-Copyright © 2006 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-#ifndef MSP_FRAMEWORK_SEMAPHORE_H_
-#define MSP_FRAMEWORK_SEMAPHORE_H_
-
-#include <pthread.h>
-#include "mutex.h"
-
-namespace Msp {
-
-class Semaphore
-{
-public:
-       Semaphore() { pthread_cond_init(&cond, 0); }
-       Mutex &get_mutex() { return mutex; }
-       int   signal()     { return pthread_cond_signal(&cond); }
-       int   broadcast()  { return pthread_cond_broadcast(&cond); }
-       int   wait()       { return pthread_cond_wait(&cond, &mutex.mutex); }
-       ~Semaphore()       { pthread_cond_destroy(&cond); }
-private:
-       Mutex mutex;
-       pthread_cond_t cond;
-};
-
-}
-
-#endif