Commit b0f24fae authored by Axel Auweter's avatar Axel Auweter
Browse files

Replace non-cross-platform pthread_yield() with Boost's yield implementation.

parent dbb4708f
......@@ -4,8 +4,8 @@ include ../config.mk
CXXFLAGS = -O0 -g -Wall -fmessage-length=0 -I$(DCDBDEPLOYPATH)/include/
OBJS = collectagent.o simplemqttserver.o simplemqttserverthread.o simplemqttservermessage.o cassandra/Cassandra.o cassandra/cassandra_constants.o cassandra/cassandra_types.o
SRC = $(patsubst cassandra/%,,$(OBJS:.o=.cpp))
#LIBS = $(shell ./cxx11flags.sh $(CXX) -L$(DCDBDEPLOYPATH)/lib/ -lthrift -lssl -lcrypto -lpthread -lboost_system | tail -1)
LIBS = -L$(DCDBDEPLOYPATH)/lib/ -lthrift -lssl -lcrypto -lpthread -lboost_system
#LIBS = $(shell ./cxx11flags.sh $(CXX) -L$(DCDBDEPLOYPATH)/lib/ -lthrift -lssl -lcrypto -lpthread -lboost_system -lboost_thread | tail -1)
LIBS = -L$(DCDBDEPLOYPATH)/lib/ -lthrift -lssl -lcrypto -lpthread -lboost_system -lboost_thread
TARGET = collectagent
SUBTARGETS = cassandra/Cassandra.h
......
......@@ -19,8 +19,9 @@
#include <boost/ptr_container/ptr_list.hpp>
#include <boost/ptr_container/ptr_vector.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/system/system_error.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp>
#ifndef SIMPLEMQTTSERVER_H_
#define SIMPLEMQTTSERVER_H_
......
......@@ -98,7 +98,7 @@ void SimpleMQTTServerThread::yield()
* may have to wait a long time before the lock will be given
* to the acceptThread.
*/
pthread_yield();
boost::this_thread::yield();
}
void SimpleMQTTServerAcceptThread::run()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment