rename ProcessSemaphore to Semaphore (libs)
authorRobin Gareus <robin@gareus.org>
Wed, 2 Dec 2015 19:18:48 +0000 (20:18 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 2 Dec 2015 19:18:48 +0000 (20:18 +0100)
libs/ardour/ardour/graph.h
libs/ardour/ardour/worker.h
libs/pbd/pbd/semutils.h
libs/pbd/semutils.cc

index 2d4a0adb308bdceef06bdfb843739fd2b6d972e7..239f9ad1abec406c2976e2d1dc48d83cdad47221 100644 (file)
@@ -101,12 +101,12 @@ private:
        std::vector<GraphNode *> _trigger_queue;
        pthread_mutex_t          _trigger_mutex;
 
-       PBD::ProcessSemaphore _execution_sem;
+       PBD::Semaphore _execution_sem;
 
        /** Signalled to start a run of the graph for a process callback */
-       PBD::ProcessSemaphore _callback_start_sem;
-       PBD::ProcessSemaphore _callback_done_sem;
-       PBD::ProcessSemaphore _cleanup_sem;
+       PBD::Semaphore _callback_start_sem;
+       PBD::Semaphore _callback_done_sem;
+       PBD::Semaphore _cleanup_sem;
 
        /** The number of processing threads that are asleep */
        volatile gint _execution_tokens;
index 529d59a4a6c7960c5746104a551009edb0534c0d..c83f006f72b21e50fc890933ef894714d45cbc67 100644 (file)
@@ -92,7 +92,7 @@ private:
        RingBuffer<uint8_t>*   _requests;
        RingBuffer<uint8_t>*   _responses;
        uint8_t*               _response;
-       PBD::ProcessSemaphore  _sem;
+       PBD::Semaphore  _sem;
        bool                   _exit;
        Glib::Threads::Thread* _thread;
 
index 50ac41919c26b9c8411706f5c360544c0645a797..6c661ab499f63dea23b1d48e6073bf93dcd62312 100644 (file)
@@ -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
 
index bafa447f8fac9185af8e275445ef90de0b9637eb..7f31d30fafca5d5d8c32629bb1695b089c99468e 100644 (file)
@@ -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);