summaryrefslogtreecommitdiff
path: root/src/semaphore.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2013-10-06 13:10:00 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2013-10-06 13:10:00 +0200
commit88a906395ba7d33ae563e70d8b94c855e3b5a573 (patch)
treeb0fa632b4c59d276b292407f79ee07aa9ef8dab8 /src/semaphore.cc
parent5727436afe5a8b1b60d99863cfc939ee50d4c17e (diff)
Refactoring of AudioFile loading and message passing from engine to gui and vice versa.
Diffstat (limited to 'src/semaphore.cc')
-rw-r--r--src/semaphore.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/semaphore.cc b/src/semaphore.cc
index d43835a..5d90c55 100644
--- a/src/semaphore.cc
+++ b/src/semaphore.cc
@@ -42,9 +42,10 @@ struct semaphore_private_t {
#endif
};
-Semaphore::Semaphore()
+Semaphore::Semaphore(const char *name)
{
- DEBUG(semaphore, "Create\n");
+ this->name = name;
+ DEBUG(semaphore, "Create [%s]\n", name);
prv = new struct semaphore_private_t();
@@ -60,7 +61,7 @@ Semaphore::Semaphore()
Semaphore::~Semaphore()
{
- DEBUG(semaphore, "Delete\n");
+ DEBUG(semaphore, "Delete [%s]\n", name);
#ifdef WIN32
CloseHandle(prv->semaphore);
@@ -73,7 +74,7 @@ Semaphore::~Semaphore()
void Semaphore::post()
{
- DEBUG(semaphore, "Post\n");
+ DEBUG(semaphore, "Post [%s]\n", name);
#ifdef WIN32
ReleaseSemaphore(prv->semaphore, 1, NULL);
@@ -84,7 +85,7 @@ void Semaphore::post()
void Semaphore::wait()
{
- DEBUG(semaphore, "Wait\n");
+ DEBUG(semaphore, "Wait [%s]\n", name);
#ifdef WIN32
WaitForSingleObject(prv->semaphore, INFINITE);