diff options
Diffstat (limited to 'libs/pbd/pthread_utils.cc')
-rw-r--r-- | libs/pbd/pthread_utils.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libs/pbd/pthread_utils.cc b/libs/pbd/pthread_utils.cc index 8274223487..69270a767b 100644 --- a/libs/pbd/pthread_utils.cc +++ b/libs/pbd/pthread_utils.cc @@ -24,6 +24,9 @@ #include <stdint.h> #include "pbd/pthread_utils.h" +#ifdef WINE_THREAD_SUPPORT +#include <fst.h> +#endif using namespace std; @@ -39,6 +42,15 @@ namespace PBD { using namespace PBD; +static int thread_creator (pthread_t* thread_id, const pthread_attr_t* attr, void *(*function)(void*), void* arg) +{ +#ifdef WINE_THREAD_SUPPORT + return wine_pthread_create (thread_id, attr, function, arg); +#else + return pthread_create (thread_id, attr, function, arg); +#endif +} + void PBD::notify_gui_about_thread_creation (pthread_t thread, std::string str, int request_count) { @@ -70,7 +82,7 @@ pthread_create_and_store (string name, pthread_t *thread, pthread_attr_t *attr, attr = &default_attr; } - if ((ret = pthread_create (thread, attr, start_routine, arg)) == 0) { + if ((ret = thread_creator (thread, attr, start_routine, arg)) == 0) { std::pair<string,pthread_t> newpair; newpair.first = name; newpair.second = *thread; |