From 235db74f0c7445cd9b5ee77346db17e180d32b93 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Wed, 12 Nov 1997 04:36:29 +0000 Subject: [PATCH] Carry over changes in ansiperl branch. Win32 branch is now the leading edge. p4raw-id: //depot/win32/perl@240 --- embed.h | 2 +- global.sym | 2 +- perl.c | 6 +++++- win32/win32thread.c | 3 +-- win32/win32thread.h | 8 ++------ 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/embed.h b/embed.h index 5a00219..64a39e4 100644 --- a/embed.h +++ b/embed.h @@ -822,7 +822,6 @@ #define pp_socket Perl_pp_socket #define pp_sockpair Perl_pp_sockpair #define pp_sort Perl_pp_sort -#define pp_specific Perl_pp_specific #define pp_splice Perl_pp_splice #define pp_split Perl_pp_split #define pp_sprintf Perl_pp_sprintf @@ -851,6 +850,7 @@ #define pp_syswrite Perl_pp_syswrite #define pp_tell Perl_pp_tell #define pp_telldir Perl_pp_telldir +#define pp_threadsv Perl_pp_threadsv #define pp_tie Perl_pp_tie #define pp_tied Perl_pp_tied #define pp_time Perl_pp_time diff --git a/global.sym b/global.sym index c2c8b0b..2806ac6 100644 --- a/global.sym +++ b/global.sym @@ -958,7 +958,6 @@ pp_snetent pp_socket pp_sockpair pp_sort -pp_specific pp_splice pp_split pp_sprintf @@ -987,6 +986,7 @@ pp_system pp_syswrite pp_tell pp_telldir +pp_threadsv pp_tie pp_tied pp_time diff --git a/perl.c b/perl.c index 2e2435e..40b781c 100644 --- a/perl.c +++ b/perl.c @@ -2844,9 +2844,13 @@ init_main_thread() #ifdef HAVE_THREAD_INTERN init_thread_intern(thr); +#endif + +#ifdef SET_THREAD_SELF + SET_THREAD_SELF(thr); #else thr->self = pthread_self(); -#endif /* HAVE_THREAD_INTERN */ +#endif /* SET_THREAD_SELF */ SET_THR(thr); /* diff --git a/win32/win32thread.c b/win32/win32thread.c index a9ca8e8..4dbc750 100644 --- a/win32/win32thread.c +++ b/win32/win32thread.c @@ -15,7 +15,7 @@ Perl_alloc_thread_key(void) } void -init_thread_intern(struct thread *thr) +Perl_set_thread_self(struct thread *thr) { #ifdef USE_THREADS /* Set thr->self. GetCurrentThread() retrurns a pseudo handle, need @@ -28,7 +28,6 @@ init_thread_intern(struct thread *thr) 0, FALSE, DUPLICATE_SAME_ACCESS); - /* XXX init thr->i here */ #endif } diff --git a/win32/win32thread.h b/win32/win32thread.h index 5bb6e6d..0c6bb55 100644 --- a/win32/win32thread.h +++ b/win32/win32thread.h @@ -108,16 +108,12 @@ typedef THREAD_RET_TYPE thread_func_t(void *); START_EXTERN_C void Perl_alloc_thread_key _((void)); int Perl_thread_create _((struct thread *thr, thread_func_t *fn)); -void Perl_init_thread_intern _((struct thread *thr)); +void Perl_set_thread_self _((struct thread *thr)); END_EXTERN_C #define INIT_THREADS NOOP #define ALLOC_THREAD_KEY Perl_alloc_thread_key() -#define HAVE_THREAD_INTERN - -struct thread_intern { - int dummy; /* XXX for now */ -}; +#define SET_THREAD_SELF(thr) Perl_set_thread_self(thr) #define JOIN(t, avp) \ STMT_START { \ -- 2.7.4