13
0

rename ProcessSemaphore to Semaphore (libs)

This commit is contained in:
Robin Gareus 2015-12-02 20:18:48 +01:00
parent 3242f16d44
commit c93f0b77bf
4 changed files with 12 additions and 12 deletions

View 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;

View 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;

View 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

View 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);