Port tests to windows and add to cmake build.

This commit is contained in:
Richard Newton
2013-08-17 13:43:45 +01:00
parent e16a6af0c7
commit 7f74fc7c99
38 changed files with 171 additions and 108 deletions

View File

@@ -26,6 +26,7 @@
#include "stdint.hpp"
#include "clock.hpp"
#include "err.hpp"
#include "thread.hpp"
#if !defined ZMQ_HAVE_WINDOWS
#include <unistd.h>
@@ -57,3 +58,17 @@ unsigned long zmq_stopwatch_stop (void *watch_)
free (watch_);
return (unsigned long) (end - start);
}
void *zmq_threadstart(void* func, void* arg)
{
zmq::thread_t* thread = new zmq::thread_t;
thread->start(static_cast<zmq::thread_fn*>(func), arg);
return thread;
}
void zmq_threadclose(void* thread)
{
zmq::thread_t* pThread = static_cast<zmq::thread_t*>(thread);
pThread->stop();
delete pThread;
}