Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clean pthreads strikes back #709

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion IlmBase/IlmThread/IlmThreadMutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class ILMTHREAD_EXPORT Mutex
void lock () const;
void unlock () const;

#if (defined (_WIN32) || defined (_WIN64)) && !defined (HAVE_PTHREADS)
#if (defined (_WIN32) || defined (_WIN64)) && !defined (HAVE_PTHREAD)
mutable CRITICAL_SECTION _mutex;
#elif defined (HAVE_PTHREAD)
mutable pthread_mutex_t _mutex;
Expand Down
4 changes: 3 additions & 1 deletion IlmBase/IlmThread/IlmThreadSemaphore.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@
# endif
# define NOMINMAX
# include <windows.h>
#elif defined(HAVE_POSIX_SEMAPHORES)
#endif

#ifdef HAVE_POSIX_SEMAPHORES
# include <semaphore.h>
#elif defined(__APPLE__)
# include <dispatch/dispatch.h>
Expand Down
2 changes: 1 addition & 1 deletion IlmBase/IlmThread/IlmThreadSemaphorePosixCompat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include "IlmBaseConfig.h"
#include "IlmThreadSemaphore.h"

#if !defined (HAVE_POSIX_SEMAPHORES) && !defined (APPLE)
#if !defined (HAVE_POSIX_SEMAPHORES) && !defined (__APPLE__)
#if (!defined (_WIN32) && !defined (_WIN64)) || defined (__MINGW64_VERSION_MAJOR)

#include "Iex.h"
Expand Down
3 changes: 2 additions & 1 deletion IlmBase/IlmThread/IlmThreadSemaphoreWin32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
//
//-----------------------------------------------------------------------------

#ifdef _WIN32
#include "IlmBaseConfig.h"
#if (defined(_WIN32) || defined(_WIN64)) && !defined(HAVE_POSIX_SEMAPHORES)

#include "IlmThreadSemaphore.h"
#include "Iex.h"
Expand Down
2 changes: 1 addition & 1 deletion IlmBase/IlmThread/IlmThreadWin32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include "IlmThread.h"

#ifdef ILMBASE_FORCE_CXX03
#if (defined (_WIN32) || defined (_WIN64)) && !defined(HAVE_POSIX_SEMAPHORES)
#if (defined (_WIN32) || defined (_WIN64)) && !defined(HAVE_PTHREAD)

#include "Iex.h"
#include <iostream>
Expand Down