thread: make it possible to set a custom create function

Make a property to pass a custom function pointer to create threads
instead of pthread_create.

Use this in jack instead of bypassing the thread utils create function,
which gives the wrong thread rt priority with rtkit.

Fixes #4099
This commit is contained in:
Wim Taymans 2024-07-09 17:04:35 +02:00
parent 7114e9a31a
commit 0f08f54ef3
3 changed files with 24 additions and 20 deletions

View file

@ -117,6 +117,8 @@ static inline int spa_thread_utils_drop_rt(struct spa_thread_utils *o,
#define SPA_KEY_THREAD_NAME "thread.name" /* the thread name */
#define SPA_KEY_THREAD_STACK_SIZE "thread.stack-size" /* the stack size of the thread */
#define SPA_KEY_THREAD_AFFINITY "thread.affinity" /* array of CPUs for this thread */
#define SPA_KEY_THREAD_CREATOR "thread.creator" /* platform specific thread creator function */
/**
* \}