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

make msgqueue_pubsub run at RT priority

parent dfd717ba
No preview for this file type
......@@ -82,10 +82,29 @@ void parse_options(int argc, const char* argv[])
cout << "LSL sourceid is: " << info_sourceid << endl;
}
int rtpriority(int n)
{
struct sched_param sched ;
memset (&sched, 0, sizeof(sched)) ;
if (n > sched_get_priority_max (SCHED_RR))
sched.sched_priority = sched_get_priority_max (SCHED_RR) ;
else
sched.sched_priority = n ;
return sched_setscheduler (0, SCHED_RR, &sched) ;
}
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(),
......
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