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 853a46120e
commit 4baa94fce2
3 changed files with 23 additions and 20 deletions

View file

@ -118,6 +118,7 @@ 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 */
/**
* \}