summaryrefslogtreecommitdiff
path: root/libs/pbd
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-12-02 20:18:48 +0100
committerRobin Gareus <robin@gareus.org>2015-12-02 20:18:48 +0100
commitc93f0b77bf149e6d361e89e84b85f4b7e99ac643 (patch)
tree5a9e68a326c9a16feb65ddbb4cd6e2233b4ba370 /libs/pbd
parent3242f16d445203425230e12f002dd79f16fc1881 (diff)
rename ProcessSemaphore to Semaphore (libs)
Diffstat (limited to 'libs/pbd')
-rw-r--r--libs/pbd/pbd/semutils.h6
-rw-r--r--libs/pbd/semutils.cc8
2 files changed, 7 insertions, 7 deletions
diff --git a/libs/pbd/pbd/semutils.h b/libs/pbd/pbd/semutils.h
index 50ac41919c..6c661ab499 100644
--- a/libs/pbd/pbd/semutils.h
+++ b/libs/pbd/pbd/semutils.h
@@ -34,7 +34,7 @@
namespace PBD {
-class LIBPBD_API ProcessSemaphore {
+class LIBPBD_API Semaphore {
private:
#ifdef WINDOWS_SEMAPHORE
HANDLE _sem;
@@ -48,8 +48,8 @@ class LIBPBD_API ProcessSemaphore {
#endif
public:
- ProcessSemaphore (const char* name, int val);
- ~ProcessSemaphore ();
+ Semaphore (const char* name, int val);
+ ~Semaphore ();
#ifdef WINDOWS_SEMAPHORE
diff --git a/libs/pbd/semutils.cc b/libs/pbd/semutils.cc
index bafa447f8f..7f31d30faf 100644
--- a/libs/pbd/semutils.cc
+++ b/libs/pbd/semutils.cc
@@ -21,7 +21,7 @@
using namespace PBD;
-ProcessSemaphore::ProcessSemaphore (const char* name, int val)
+Semaphore::Semaphore (const char* name, int val)
{
#ifdef WINDOWS_SEMAPHORE
if ((_sem = CreateSemaphore(NULL, val, 32767, name)) == NULL) {
@@ -48,7 +48,7 @@ ProcessSemaphore::ProcessSemaphore (const char* name, int val)
#endif
}
-ProcessSemaphore::~ProcessSemaphore ()
+Semaphore::~Semaphore ()
{
#ifdef WINDOWS_SEMAPHORE
CloseHandle(_sem);
@@ -60,14 +60,14 @@ ProcessSemaphore::~ProcessSemaphore ()
#ifdef WINDOWS_SEMAPHORE
int
-ProcessSemaphore::signal ()
+Semaphore::signal ()
{
// non-zero on success, opposite to posix
return !ReleaseSemaphore(_sem, 1, NULL);
}
int
-ProcessSemaphore::wait ()
+Semaphore::wait ()
{
DWORD result = 0;
result = WaitForSingleObject(_sem, INFINITE);