mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
d/wmr: Try to set realtime priority on USB thread
This commit is contained in:
parent
0d6d42041f
commit
cc263e2579
|
@ -38,6 +38,10 @@
|
||||||
#include "util/u_distortion_mesh.h"
|
#include "util/u_distortion_mesh.h"
|
||||||
#include "util/u_sink.h"
|
#include "util/u_sink.h"
|
||||||
|
|
||||||
|
#ifdef XRT_OS_LINUX
|
||||||
|
#include "util/u_linux.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "tracking/t_tracking.h"
|
#include "tracking/t_tracking.h"
|
||||||
|
|
||||||
#include "wmr_hmd.h"
|
#include "wmr_hmd.h"
|
||||||
|
@ -646,10 +650,17 @@ control_read_packets(struct wmr_hmd *wh)
|
||||||
static void *
|
static void *
|
||||||
wmr_run_thread(void *ptr)
|
wmr_run_thread(void *ptr)
|
||||||
{
|
{
|
||||||
U_TRACE_SET_THREAD_NAME("WMR: USB-HMD");
|
|
||||||
|
|
||||||
struct wmr_hmd *wh = (struct wmr_hmd *)ptr;
|
struct wmr_hmd *wh = (struct wmr_hmd *)ptr;
|
||||||
|
|
||||||
|
U_TRACE_SET_THREAD_NAME("WMR: USB-HMD");
|
||||||
|
os_thread_helper_name(&wh->oth, "WMR: USB-HMD");
|
||||||
|
|
||||||
|
#ifdef XRT_OS_LINUX
|
||||||
|
// Try to raise priority of this thread.
|
||||||
|
u_linux_try_to_set_realtime_priority_on_thread(wh->log_level, "WMR: USB-HMD");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
os_thread_helper_lock(&wh->oth);
|
os_thread_helper_lock(&wh->oth);
|
||||||
while (os_thread_helper_is_running_locked(&wh->oth)) {
|
while (os_thread_helper_is_running_locked(&wh->oth)) {
|
||||||
os_thread_helper_unlock(&wh->oth);
|
os_thread_helper_unlock(&wh->oth);
|
||||||
|
|
Loading…
Reference in a new issue