Monado OpenXR Runtime
Loading...
Searching...
No Matches
u_thread_priority.h
Go to the documentation of this file.
1
// Copyright 2023-2026, Collabora, Ltd.
2
// SPDX-License-Identifier: BSL-1.0
3
/*!
4
* @file
5
* @brief Set thread priorities in a cross-platform manner
6
* @author Jakob Bornecrantz <jakob@collabora.com>
7
* @author Korcan Hussein <korcan.hussein@collabora.com>
8
*
9
* @ingroup aux_util
10
*/
11
12
#pragma once
13
14
#include "
xrt/xrt_compiler.h
"
15
#include "
util/u_logging.h
"
16
17
18
#ifdef __cplusplus
19
extern
"C"
{
20
#endif
21
22
/*!
23
* Try to set realtime priority on this thread. Passing in log_level to control
24
* how chatty this function is, the name is to make the logging pretty, can be
25
* NULL and the code will try to figure out the name itself.
26
*
27
* @param name Thread name to be used in logging.
28
* @param log_level Logging level to control chattiness.
29
*
30
* @return Returns true/false if setting real-time priority was successful
31
*
32
* @ingroup aux_util
33
*/
34
bool
35
u_try_to_set_realtime_priority_on_thread
(
enum
u_logging_level
log_level,
const
char
*name);
36
37
38
#ifdef __cplusplus
39
}
40
#endif
u_logging_level
u_logging_level
Logging level enum.
Definition
u_logging.h:45
u_try_to_set_realtime_priority_on_thread
bool u_try_to_set_realtime_priority_on_thread(enum u_logging_level log_level, const char *name)
Try to set realtime priority on this thread.
Definition
u_thread_priority.c:25
u_logging.h
Basic logging functionality.
xrt_compiler.h
Header holding common defines.
auxiliary
util
u_thread_priority.h
Generated by
1.9.8