35 #include <spa/utils/defs.h>
36 #include <spa/utils/hook.h>
37 #include <spa/utils/dict.h>
51 #define SPA_TYPE_INFO_Thread SPA_TYPE_INFO_POINTER_BASE "Thread"
54 #define SPA_TYPE_INTERFACE_ThreadUtils SPA_TYPE_INFO_INTERFACE_BASE "ThreadUtils"
55 #define SPA_VERSION_THREAD_UTILS 0
60 #define SPA_VERSION_THREAD_UTILS_METHODS 0
65 void *(*start)(
void*),
void *arg);
80 const struct spa_dict *props,
void *(*start_routine)(
void*),
void *arg)
85 props, start_routine, arg);
104 const struct spa_dict *props,
int *min,
int *max)
#define spa_interface_call_res(iface, method_type, res, method, vers,...)
Invoke method named method in the callbacks on the given interface object.
Definition: hook.h:255
int(* join)(void *data, struct spa_thread *thread, void **retval)
stop and join a thread
Definition: thread.h:77
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:80
int(* acquire_rt)(void *data, struct spa_thread *thread, int priority)
acquire realtime priority
Definition: thread.h:82
static int spa_thread_utils_acquire_rt(struct spa_thread_utils *o, struct spa_thread *thread, int priority)
Definition: thread.h:125
static int spa_thread_utils_drop_rt(struct spa_thread_utils *o, struct spa_thread *thread)
Definition: thread.h:137
uint32_t version
Definition: thread.h:71
thread utils
Definition: thread.h:68
static int spa_thread_utils_join(struct spa_thread_utils *o, struct spa_thread *thread, void **retval)
Definition: thread.h:101
int(* drop_rt)(void *data, struct spa_thread *thread)
drop realtime priority
Definition: thread.h:84
static struct spa_thread * spa_thread_utils_create(struct spa_thread_utils *o, const struct spa_dict *props, void *(*start_routine)(void *), void *arg)
Definition: thread.h:89
static int spa_thread_utils_get_rt_range(struct spa_thread_utils *o, const struct spa_dict *props, int *min, int *max)
Definition: thread.h:113
struct spa_interface iface
Definition: thread.h:65