diff options
Diffstat (limited to 'gnuradio-core')
-rw-r--r-- | gnuradio-core/src/lib/omnithread/nt.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gnuradio-core/src/lib/omnithread/nt.cc b/gnuradio-core/src/lib/omnithread/nt.cc index 644501a35..03398aaa7 100644 --- a/gnuradio-core/src/lib/omnithread/nt.cc +++ b/gnuradio-core/src/lib/omnithread/nt.cc @@ -32,6 +32,7 @@ #include <stdlib.h> #include <errno.h> +#include <WinError.h> #include <omnithread.h> #include <process.h> @@ -385,7 +386,8 @@ omni_semaphore::trywait(void) void omni_semaphore::post(void) { - if (!ReleaseSemaphore(nt_sem, 1, NULL)) + if (!ReleaseSemaphore(nt_sem, 1, NULL) + && GetLastError() != ERROR_TOO_MANY_POSTS ) // MinGW fix by Don Ward throw omni_thread_fatal(GetLastError()); } |