diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-04-16 16:02:25 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-04-16 16:02:25 +0000 |
commit | a4b8955f3eb87405ceafe5c8680d9439f441458e (patch) | |
tree | cad2bf815f268ec1fdad34c1cc09089289ee3736 /libs/pbd/pthread_utils.cc | |
parent | 60eef7dd3e0240367550a274a91ddb498dedcbc2 (diff) |
part 2 of 3 of the 2.8 -> 3.0 merge
git-svn-id: svn://localhost/ardour2/branches/3.0@4987 d708f5d6-7413-0410-9779-e7cbd77b26cf
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; |