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;
RingBuffer<uint8_t>* _requests;
RingBuffer<uint8_t>* _responses;
uint8_t* _response;
- PBD::ProcessSemaphore _sem;
+ PBD::Semaphore _sem;
bool _exit;
Glib::Threads::Thread* _thread;
namespace PBD {
-class LIBPBD_API ProcessSemaphore {
+class LIBPBD_API Semaphore {
private:
#ifdef WINDOWS_SEMAPHORE
HANDLE _sem;
#endif
public:
- ProcessSemaphore (const char* name, int val);
- ~ProcessSemaphore ();
+ Semaphore (const char* name, int val);
+ ~Semaphore ();
#ifdef WINDOWS_SEMAPHORE
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) {
#endif
}
-ProcessSemaphore::~ProcessSemaphore ()
+Semaphore::~Semaphore ()
{
#ifdef WINDOWS_SEMAPHORE
CloseHandle(_sem);
#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);