Loading...
Searching...
No Matches
thread.h
Go to the documentation of this file.
/* PipeWire */
/* SPDX-FileCopyrightText: Copyright © 2021 Wim Taymans */
/* SPDX-License-Identifier: MIT */
#ifndef PIPEWIRE_THREAD_H
#define PIPEWIRE_THREAD_H
#include <string.h>
#include <errno.h>
#include <spa/support/thread.h>
#ifdef __cplusplus
extern "C" {
#endif
SPA_DEPRECATED
void pw_thread_utils_set(struct spa_thread_utils *impl);
struct spa_thread_utils *pw_thread_utils_get(void);
void *pw_thread_fill_attr(const struct spa_dict *props, void *attr);
#ifndef PW_API_THREAD_IMPL
#define PW_API_THREAD_IMPL static inline
#endif
PW_API_THREAD_IMPL struct spa_thread *pw_thread_utils_create(
const struct spa_dict *props, void *(*start_routine)(void*), void *arg)
{
return spa_thread_utils_create(pw_thread_utils_get(), props, start_routine, arg);
}
PW_API_THREAD_IMPL int pw_thread_utils_join(struct spa_thread *thread, void **retval)
{
return spa_thread_utils_join(pw_thread_utils_get(), thread, retval);
}
PW_API_THREAD_IMPL int pw_thread_utils_get_rt_range(const struct spa_dict *props, int *min, int *max)
{
return spa_thread_utils_get_rt_range(pw_thread_utils_get(), props, min, max);
}
PW_API_THREAD_IMPL int pw_thread_utils_acquire_rt(struct spa_thread *thread, int priority)
{
return spa_thread_utils_acquire_rt(pw_thread_utils_get(), thread, priority);
}
PW_API_THREAD_IMPL int pw_thread_utils_drop_rt(struct spa_thread *thread)
{
return spa_thread_utils_drop_rt(pw_thread_utils_get(), thread);
}
/**
* \}
*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* PIPEWIRE_THREAD_H */
pw_thread_fill_attr
void * pw_thread_fill_attr(const struct spa_dict *props, void *attr)
Definition thread.c:50
pw_thread_utils_get
struct spa_thread_utils * pw_thread_utils_get(void)
Definition thread.c:198
pw_thread_utils_set
void pw_thread_utils_set(struct spa_thread_utils *impl)
Definition thread.c:192
pw_thread_utils_drop_rt
PW_API_THREAD_IMPL int pw_thread_utils_drop_rt(struct spa_thread *thread)
Definition thread.h:58
pw_thread_utils_get_rt_range
PW_API_THREAD_IMPL int pw_thread_utils_get_rt_range(const struct spa_dict *props, int *min, int *max)
Definition thread.h:50
pw_thread_utils_create
PW_API_THREAD_IMPL struct spa_thread * pw_thread_utils_create(const struct spa_dict *props, void *(*start_routine)(void *), void *arg)
Definition thread.h:41
pw_thread_utils_acquire_rt
PW_API_THREAD_IMPL int pw_thread_utils_acquire_rt(struct spa_thread *thread, int priority)
Definition thread.h:54
pw_thread_utils_join
PW_API_THREAD_IMPL int pw_thread_utils_join(struct spa_thread *thread, void **retval)
Definition thread.h:46
PW_API_THREAD_IMPL
#define PW_API_THREAD_IMPL
Definition thread.h:38
spa_thread_utils_drop_rt
SPA_API_THREAD int spa_thread_utils_drop_rt(struct spa_thread_utils *o, struct spa_thread *thread)
drop realtime priority
Definition thread.h:121
spa_thread_utils_acquire_rt
SPA_API_THREAD int spa_thread_utils_acquire_rt(struct spa_thread_utils *o, struct spa_thread *thread, int priority)
acquire realtime priority, a priority of -1 refers to the priority configured in the realtime module
Definition thread.h:111
spa_thread_utils_get_rt_range
SPA_API_THREAD int spa_thread_utils_get_rt_range(struct spa_thread_utils *o, const struct spa_dict *props, int *min, int *max)
get realtime priority range for threads created with props
Definition thread.h:101
spa_thread_utils_create
SPA_API_THREAD struct spa_thread * spa_thread_utils_create(struct spa_thread_utils *o, const struct spa_dict *props, void *(*start_routine)(void *), void *arg)
create a new thread that runs start with arg
Definition thread.h:81
spa_thread_utils_join
SPA_API_THREAD int spa_thread_utils_join(struct spa_thread_utils *o, struct spa_thread *thread, void **retval)
stop and join a thread
Definition thread.h:91
SPA_DEPRECATED
#define SPA_DEPRECATED
Definition defs.h:303
thread.h
spa/support/thread.h
string.h
spa/utils/string.h
spa_dict
Definition dict.h:51
spa_thread_utils
Definition thread.h:55
spa_thread