change minimum version to windows vista and implement dummy condition variable for lower versions

This commit is contained in:
somdoron
2015-04-25 23:21:27 +03:00
parent dbacc34238
commit c2dcc80602
5 changed files with 45 additions and 29 deletions

View File

@@ -31,6 +31,47 @@
#include "windows.hpp"
// Condition variable is supported from Windows Vista only, to use condition variable define _WIN32_WINNT to 0x0600
#if _WIN32_WINNT < 0x0600
namespace zmq
{
class condition_variable_t
{
public:
inline condition_variable_t ()
{
zmq_assert(false);
}
inline ~condition_variable_t ()
{
}
inline int wait (mutex_t* mutex_, int timeout_ )
{
zmq_assert(false);
return -1;
}
inline void broadcast ()
{
zmq_assert(false);
}
private:
// Disable copy construction and assignment.
condition_variable_t (const condition_variable_t&);
void operator = (const condition_variable_t&);
};
}
#else
namespace zmq
{
@@ -79,6 +120,8 @@ namespace zmq
}
#endif
#else
#include <pthread.h>