mirror of
https://github.com/zeromq/libzmq.git
synced 2025-10-27 11:06:52 +01:00
Port tests to windows and add to cmake build.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user