40 struct sched_param params;
41 params.sched_priority = priority;
42 int ret = pthread_setschedparam(thread, SCHED_FIFO, ¶ms);
49 URCL_LOG_ERROR(
"Your system/user seems not to be setup for FIFO scheduling. We recommend using a lowlatency " 50 "kernel with FIFO scheduling. See " 51 "https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/" 52 "doc/real_time.md for details.");
58 URCL_LOG_ERROR(
"Unsuccessful in setting thread to FIFO scheduling with priority %i. %s", priority,
65 ret = pthread_getschedparam(thread, &policy, ¶ms);
73 if (policy != SCHED_FIFO)
80 URCL_LOG_INFO(
"SCHED_FIFO OK, priority %i", params.sched_priority);
81 if (params.sched_priority != priority)
83 URCL_LOG_ERROR(
"Thread priority is %i instead of the expected %i", params.sched_priority, priority);
#define URCL_LOG_ERROR(...)
bool setFiFoScheduling(pthread_t &thread, const int priority)
#define URCL_LOG_INFO(...)