From: Nick Ing-Simmons Date: Wed, 12 Nov 1997 02:45:15 +0000 (+0000) Subject: Fixup Win32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=88bf70ddad663558df6e83dce8f369f639fc7dd6;p=p5sagit%2Fp5-mst-13.2.git Fixup Win32 - #undef start_env before re-#defining it - change pp_specific pp_threadsv in global.sym - re-build embed.h - avoid HAVE_THREAD_INTERN - we don't and empty struct is a pain. If we did have it it would contain cached values of things we can only get at _IN_ the thread so new_struct_thread is wrong place to call it. - add new macro SET_THREAD_SELF - we must (in main thread) define in win32thread.h, support in win32thread.c, test and call in perl.c p4raw-id: //depot/ansiperl@237 --- diff --git a/embed.h b/embed.h index 32c2fcc..f911bae 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..178fa29 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 @@ -992,6 +991,7 @@ pp_tied pp_time pp_tms pp_trans +pp_threadsv pp_truncate pp_uc pp_ucfirst diff --git a/perl.c b/perl.c index 7264648..7b49b7b 100644 --- a/perl.c +++ b/perl.c @@ -2843,6 +2843,10 @@ 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 */ diff --git a/thread.h b/thread.h index 2f81e35..80da097 100644 --- a/thread.h +++ b/thread.h @@ -309,6 +309,7 @@ typedef struct condpair { #undef chopset #undef formtarget #undef bodytarget +#undef start_env #undef toptarget #undef top_env #undef runlevel diff --git a/win32/win32thread.c b/win32/win32thread.c index dfa9a0c..9219967 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 /* GetCurrentThread() retrurns a pseudo handle, need diff --git a/win32/win32thread.h b/win32/win32thread.h index 75aa25b..03b0807 100644 --- a/win32/win32thread.h +++ b/win32/win32thread.h @@ -105,12 +105,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 INIT_THREAD_INTERN(thr) Perl_init_thread_intern(thr) +#define SET_THREAD_SELF(thr) Perl_set_thread_self(thr) #define JOIN(t, avp) \ STMT_START { \