diff --git a/limelight-common/LinkedBlockingQueue.cpp b/limelight-common/LinkedBlockingQueue.cpp index d7a04da..a69dabc 100644 --- a/limelight-common/LinkedBlockingQueue.cpp +++ b/limelight-common/LinkedBlockingQueue.cpp @@ -43,10 +43,10 @@ int offerQueueItem(PLINKED_BLOCKING_QUEUE queueHead, void* data) { lastEntry->next = entry; } - PltSetEvent(&queueHead->containsDataEvent); - PltUnlockMutex(&queueHead->mutex); + PltSetEvent(&queueHead->containsDataEvent); + return 1; } diff --git a/limelight-common/PlatformThreads.cpp b/limelight-common/PlatformThreads.cpp index ca41a30..1016b62 100644 --- a/limelight-common/PlatformThreads.cpp +++ b/limelight-common/PlatformThreads.cpp @@ -153,10 +153,8 @@ void PltSetEvent(PLT_EVENT *event) { #ifdef _WIN32 SetEvent(*event); #else - pthread_mutex_lock(&event->mutex); event->signalled = 1; - pthread_cond_signal(&event->cond); - pthread_mutex_unlock(&event->mutex); + pthread_cond_broadcast(&event->cond); #endif } @@ -164,9 +162,7 @@ void PltClearEvent(PLT_EVENT *event) { #ifdef _WIN32 ResetEvent(*event); #else - pthread_mutex_lock(&event->mutex); event->signalled = 0; - pthread_mutex_unlock(&event->mutex); #endif } @@ -176,7 +172,7 @@ void PltPulseEvent(PLT_EVENT *event) { #else pthread_mutex_lock(&event->mutex); event->signalled = 1; - pthread_cond_signal(&event->cond); + pthread_cond_broadcast(&event->cond); event->signalled = 0; pthread_mutex_unlock(&event->mutex); #endif