diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 1997-11-12 02:45:15 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 1997-11-12 02:45:15 +0000 |
commit | 88bf70ddad663558df6e83dce8f369f639fc7dd6 (patch) | |
tree | 63d91f50cbc7caf5b6cb1f6adde252bdc82f0adf | |
parent | b895db692edda991298fa3a7f36edb9c757894ee (diff) | |
download | perl-88bf70ddad663558df6e83dce8f369f639fc7dd6.tar.gz |
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
-rw-r--r-- | embed.h | 2 | ||||
-rw-r--r-- | global.sym | 2 | ||||
-rw-r--r-- | perl.c | 4 | ||||
-rw-r--r-- | thread.h | 1 | ||||
-rw-r--r-- | win32/win32thread.c | 2 | ||||
-rw-r--r-- | win32/win32thread.h | 4 |
6 files changed, 10 insertions, 5 deletions
@@ -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 c2c8b0b18e..178fa29f70 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 @@ -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 */ @@ -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 dfa9a0c733..92199678e2 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 75aa25b632..03b0807b72 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 { \ |