Commit e6de9525 authored by Your Name's avatar Your Name
Browse files

RT priority stuff

parent e866e04b
No preview for this file type
......@@ -5,6 +5,7 @@
// Olivier Chamoux <olivier.chamoux@fr.thalesgroup.com>
#include <zmq.h>
#include "zhelpers.hpp"
#include <lsl_cpp.h>
#include <iostream>
......@@ -100,11 +101,6 @@ int main (int argc, const char *argv[])
{
parse_options(argc, argv);
if (rtpriority(99) < 0) {
perror("rtpriority");
return 1;
}
// make a new stream_info and open an outlet with it
stream_info info(
info_name.c_str(),
......@@ -119,6 +115,17 @@ int main (int argc, const char *argv[])
zmq::context_t context(1);
// set priority
// GW: check threads with 'ps -mLca'
void * c = (void *) context;
zmq_ctx_set(c,ZMQ_THREAD_SCHED_POLICY,SCHED_RR);
zmq_ctx_set(c,ZMQ_THREAD_PRIORITY,90);
if (rtpriority(89) < 0) {
perror("rtpriority");
return 1;
}
// Socket facing clients
zmq::socket_t frontend (context, ZMQ_SUB);
frontend.bind("tcp://*:5556");
......
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