Go to the documentation of this file.
25 #ifndef PIPEWIRE_THREAD_H
26 #define PIPEWIRE_THREAD_H
43 #define PW_TYPE_INTERFACE_ThreadUtils PW_TYPE_INFO_INTERFACE_BASE "ThreadUtils"
50 #define PW_VERSION_THREAD_UTILS 0
55 #define PW_VERSION_THREAD_UTILS_METHODS 0
59 struct pw_thread * (*create) (
void *
data,
const struct spa_dict *props,
60 void *(*start)(
void*),
void *arg);
75 static inline struct pw_thread *pw_thread_utils_create(
const struct spa_dict *props,
76 void *(*start_routine)(
void*),
void *arg)
78 struct pw_thread *
res = NULL;
81 props, start_routine, arg);
85 static inline int pw_thread_utils_join(
struct pw_thread *
thread,
void **retval)
94 static inline int pw_thread_utils_get_rt_range(
const struct spa_dict *props,
int *min,
int *max)
103 static inline int pw_thread_utils_acquire_rt(
struct pw_thread *
thread,
int priority)
112 static inline int pw_thread_utils_drop_rt(
struct pw_thread *
thread)
struct pw_thread_utils_methods methods
Definition: thread.c:69
#define SPA_EXPORT
Definition: defs.h:208
Definition: module-rtkit.c:70
struct pw_thread_utils * pw_thread_utils_get_impl(void)
Definition: thread.c:93
#define spa_interface_call_res(iface, type, res, method, vers,...)
Definition: hook.h:170
int(* join)(void *data, struct pw_thread *thread, void **retval)
stop and join a thread
Definition: thread.h:62
static uint32_t int int res
Definition: core.h:329
void pw_thread_utils_set_impl(struct pw_thread_utils *impl)
Definition: thread.c:85
SPA_EXPORT struct pw_thread_utils * pw_thread_utils_get_impl(void)
Definition: thread.c:93
#define PW_VERSION_THREAD_UTILS
Definition: thread.h:50
#define PW_VERSION_THREAD_UTILS_METHODS
Definition: thread.h:55
Definition: utils/dict.h:48
struct spa_interface iface
Definition: thread.h:51
int(* get_rt_range)(void *data, const struct spa_dict *props, int *min, int *max)
get realtime priority range for threads created with props
Definition: thread.h:65
#define SPA_CALLBACKS_INIT(_funcs, _data)
Definition: hook.h:63
int(* drop_rt)(void *data, struct pw_thread *thread)
drop realtime priority
Definition: thread.h:69
#define PW_TYPE_INTERFACE_ThreadUtils
Definition: thread.h:43
uint32_t version
Definition: thread.h:56
struct pw_thread_utils utils
Definition: thread.c:68
thread utils
Definition: thread.h:54
int(* acquire_rt)(void *data, struct pw_thread *thread, int priority)
acquire realtime priority
Definition: thread.h:67
SPA_EXPORT void pw_thread_utils_set_impl(struct pw_thread_utils *impl)
Definition: thread.c:85