Module: wine Branch: master Commit: 679aab877f57d012ac7513390567115dd3feae3f URL: http://source.winehq.org/git/wine.git/?a=commit;h=679aab877f57d012ac75133905...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Apr 29 20:19:02 2008 +0200
loader: Add stub versions of the pthread functions.
---
loader/pthread.c | 47 +++++++++++++++++++++++++++++++++++++++++++---- 1 files changed, 43 insertions(+), 4 deletions(-)
diff --git a/loader/pthread.c b/loader/pthread.c index 7414e98..dd1a3ba 100644 --- a/loader/pthread.c +++ b/loader/pthread.c @@ -21,8 +21,6 @@ #include "config.h" #include "wine/port.h"
-#ifdef HAVE_PTHREAD_H - #include <assert.h> #include <stdlib.h> #include <signal.h> @@ -45,6 +43,8 @@ #include "wine/library.h" #include "wine/pthread.h"
+#ifdef HAVE_PTHREAD_H + static int init_done; static int nb_threads = 1;
@@ -201,6 +201,47 @@ static void DECLSPEC_NORETURN abort_thread( long status ) pthread_exit( (void *)status ); }
+#else /* HAVE_PTHREAD_H */ + +static void init_process( const struct wine_pthread_callbacks *callbacks, size_t size ) +{ +} + +static void init_thread( struct wine_pthread_thread_info *info ) +{ +} + +static int create_thread( struct wine_pthread_thread_info *info ) +{ + return -1; +} + +static void init_current_teb( struct wine_pthread_thread_info *info ) +{ +} + +static void *get_current_teb(void) +{ + return NULL; +} + +static void DECLSPEC_NORETURN exit_thread( struct wine_pthread_thread_info *info ) +{ + abort(); +} + +static void DECLSPEC_NORETURN abort_thread( long status ) +{ + abort(); +} + +static int pthread_sigmask( int how, const sigset_t *newset, sigset_t *oldset ) +{ + return -1; +} + +#endif /* HAVE_PTHREAD_H */ +
/*********************************************************************** * pthread_functions @@ -216,5 +257,3 @@ const struct wine_pthread_functions pthread_functions = abort_thread, pthread_sigmask }; - -#endif /* HAVE_PTHREAD_H */