mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
d/dai: Try to set realtime priority on IMU thread
This commit is contained in:
parent
1b221c7666
commit
67a8147c09
|
@ -25,6 +25,10 @@
|
||||||
#include "util/u_logging.h"
|
#include "util/u_logging.h"
|
||||||
#include "util/u_trace_marker.h"
|
#include "util/u_trace_marker.h"
|
||||||
|
|
||||||
|
#ifdef XRT_OS_LINUX
|
||||||
|
#include "util/u_linux.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "tracking/t_tracking.h"
|
#include "tracking/t_tracking.h"
|
||||||
|
|
||||||
#include "depthai_interface.h"
|
#include "depthai_interface.h"
|
||||||
|
@ -616,6 +620,11 @@ depthai_imu_mainloop(void *ptr)
|
||||||
U_TRACE_SET_THREAD_NAME("DepthAI: IMU");
|
U_TRACE_SET_THREAD_NAME("DepthAI: IMU");
|
||||||
os_thread_helper_name(&depthai->imu_thread, "DepthAI: IMU");
|
os_thread_helper_name(&depthai->imu_thread, "DepthAI: IMU");
|
||||||
|
|
||||||
|
#ifdef XRT_OS_LINUX
|
||||||
|
// Try to raise priority of this thread.
|
||||||
|
u_linux_try_to_set_realtime_priority_on_thread(depthai->log_level, "DepthAI: IMU");
|
||||||
|
#endif
|
||||||
|
|
||||||
DEPTHAI_DEBUG(depthai, "DepthAI: IMU thread called");
|
DEPTHAI_DEBUG(depthai, "DepthAI: IMU thread called");
|
||||||
|
|
||||||
os_thread_helper_lock(&depthai->imu_thread);
|
os_thread_helper_lock(&depthai->imu_thread);
|
||||||
|
|
Loading…
Reference in a new issue