From a96d83e76261acc208bc90b9ff3c3b050cecba40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sun, 2 Mar 2014 22:54:17 +0200 Subject: [PATCH] Remove the broken WelsEventReset function This function didn't work properly with named semaphores, which are used in the unix codepaths. Since it's unused, just remove it instead. --- codec/common/WelsThreadLib.cpp | 11 ----------- codec/common/WelsThreadLib.h | 1 - 2 files changed, 12 deletions(-) diff --git a/codec/common/WelsThreadLib.cpp b/codec/common/WelsThreadLib.cpp index 4ad67dad..b2b1b78d 100644 --- a/codec/common/WelsThreadLib.cpp +++ b/codec/common/WelsThreadLib.cpp @@ -108,12 +108,6 @@ WELS_THREAD_ERROR_CODE WelsEventSignal (WELS_EVENT* event) { return WELS_THREAD_ERROR_GENERAL; } -WELS_THREAD_ERROR_CODE WelsEventReset (WELS_EVENT* event) { - if (ResetEvent (*event)) - return WELS_THREAD_ERROR_OK; - return WELS_THREAD_ERROR_GENERAL; -} - WELS_THREAD_ERROR_CODE WelsEventWait (WELS_EVENT* event) { return WaitForSingleObject (*event, INFINITE); } @@ -297,11 +291,6 @@ WELS_THREAD_ERROR_CODE WelsEventSignal (WELS_EVENT* event) { // fprintf( stderr, "after signal it, val= %d..\n",val ); return err; } -WELS_THREAD_ERROR_CODE WelsEventReset (WELS_EVENT* event) { - // FIXME for posix event reset, seems not be supported for pthread?? - sem_close (event); - return sem_init (event, 0, 0); -} WELS_THREAD_ERROR_CODE WelsEventWait (WELS_EVENT* event) { return sem_wait (event); // blocking until signaled diff --git a/codec/common/WelsThreadLib.h b/codec/common/WelsThreadLib.h index d2ab71c3..a3401417 100644 --- a/codec/common/WelsThreadLib.h +++ b/codec/common/WelsThreadLib.h @@ -116,7 +116,6 @@ WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, char* event_name); WELS_THREAD_ERROR_CODE WelsEventInit (WELS_EVENT* event); WELS_THREAD_ERROR_CODE WelsEventDestroy (WELS_EVENT* event); WELS_THREAD_ERROR_CODE WelsEventSignal (WELS_EVENT* event); -WELS_THREAD_ERROR_CODE WelsEventReset (WELS_EVENT* event); WELS_THREAD_ERROR_CODE WelsEventWait (WELS_EVENT* event); WELS_THREAD_ERROR_CODE WelsEventWaitWithTimeOut (WELS_EVENT* event, uint32_t dwMilliseconds); #ifdef _WIN32