diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile | 29 | ||||
-rw-r--r-- | win32/config.bc | 1 | ||||
-rw-r--r-- | win32/config.gc | 1 | ||||
-rw-r--r-- | win32/config.vc | 1 | ||||
-rw-r--r-- | win32/config.vc64 | 1 | ||||
-rw-r--r-- | win32/config_H.bc | 8 | ||||
-rw-r--r-- | win32/config_H.gc | 8 | ||||
-rw-r--r-- | win32/config_H.vc | 8 | ||||
-rw-r--r-- | win32/config_H.vc64 | 8 | ||||
-rw-r--r-- | win32/config_sh.PL | 7 | ||||
-rw-r--r-- | win32/makefile.mk | 27 | ||||
-rw-r--r-- | win32/perllib.c | 2 | ||||
-rw-r--r-- | win32/win32.c | 8 | ||||
-rw-r--r-- | win32/win32.h | 32 | ||||
-rw-r--r-- | win32/win32sck.c | 6 | ||||
-rw-r--r-- | win32/win32thread.c | 80 | ||||
-rw-r--r-- | win32/win32thread.h | 10 |
17 files changed, 20 insertions, 217 deletions
diff --git a/win32/Makefile b/win32/Makefile index 76163fa062..9cc3399f65 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -74,16 +74,6 @@ USE_IMP_SYS = define USE_PERLIO = define # -# WARNING! This option is deprecated and will eventually go away (enable -# USE_ITHREADS instead). -# -# uncomment to enable threads-capabilities. This is incompatible with -# USE_ITHREADS, and is only here for people who may have come to rely -# on the experimental Thread support that was in 5.005. -# -#USE_5005THREADS = define - -# # uncomment one of the following lines if you are using either # Visual C++ 2.x or Visual C++ 6.x (aka Visual Studio 98) # @@ -206,14 +196,6 @@ CRYPT_FLAG = -DHAVE_DES_FCRYPT PERL_MALLOC = undef !ENDIF -!IF "$(USE_5005THREADS)" == "" -USE_5005THREADS = undef -!ENDIF - -!IF "$(USE_5005THREADS)" == "define" -USE_ITHREADS = undef -!ENDIF - !IF "$(USE_IMP_SYS)" == "define" PERL_MALLOC = undef !ENDIF @@ -238,16 +220,15 @@ USE_PERLIO = undef USE_PERLCRT = undef !ENDIF -!IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef" +!IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef" USE_MULTI = define !ENDIF !IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef" USE_MULTI = define -USE_5005THREADS = undef !ENDIF -!IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef" +!IF "$(USE_MULTI)" != "undef" BUILDOPT = $(BUILDOPT) -DPERL_IMPLICIT_CONTEXT !ENDIF @@ -272,9 +253,6 @@ WIN64 = undef !ENDIF !ENDIF -!IF "$(USE_5005THREADS)" == "define" -ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread -!ELSE !IF "$(USE_MULTI)" == "define" ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi !ELSE @@ -284,7 +262,6 @@ ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-perlio ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE) !ENDIF !ENDIF -!ENDIF !IF "$(USE_PERLIO)" == "define" BUILDOPT = $(BUILDOPT) -DUSE_PERLIO @@ -787,9 +764,7 @@ CFG_VARS = \ "libpth=$(CCLIBDIR:"=\");$(EXTRALIBDIRS:"=\")" \ "libc=$(LIBC)" \ "make=$(MAKE_BARE)" \ - "use5005threads=$(USE_5005THREADS)" \ "useithreads=$(USE_ITHREADS)" \ - "usethreads=$(USE_5005THREADS)" \ "usemultiplicity=$(USE_MULTI)" \ "useperlio=$(USE_PERLIO)" \ "LINK_FLAGS=$(LINK_FLAGS:"=\")" \ diff --git a/win32/config.bc b/win32/config.bc index 42c8449f8d..7d669fffa8 100644 --- a/win32/config.bc +++ b/win32/config.bc @@ -899,7 +899,6 @@ uidtype='uid_t' uname='uname' uniq='uniq' uquadtype='unsigned __int64' -use5005threads='undef' use64bitall='undef' use64bitint='undef' usecrosscompile='undef' diff --git a/win32/config.gc b/win32/config.gc index 3c2fc0c5da..141fb542ee 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -899,7 +899,6 @@ uidtype='uid_t' uname='uname' uniq='uniq' uquadtype='unsigned long long' -use5005threads='undef' use64bitall='undef' use64bitint='undef' usecrosscompile='undef' diff --git a/win32/config.vc b/win32/config.vc index 8d94c569a4..89192be0a0 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -899,7 +899,6 @@ uidtype='uid_t' uname='uname' uniq='uniq' uquadtype='unsigned __int64' -use5005threads='undef' use64bitall='undef' use64bitint='undef' usecrosscompile='undef' diff --git a/win32/config.vc64 b/win32/config.vc64 index fbc4308b34..bc969884bb 100644 --- a/win32/config.vc64 +++ b/win32/config.vc64 @@ -899,7 +899,6 @@ uidtype='uid_t' uname='uname' uniq='uniq' uquadtype='unsigned __int64' -use5005threads='undef' use64bitall='undef' use64bitint='define' usecrosscompile='undef' diff --git a/win32/config_H.bc b/win32/config_H.bc index e89d0c81e2..f4fec85114 100644 --- a/win32/config_H.bc +++ b/win32/config_H.bc @@ -3493,10 +3493,6 @@ * This symbol, if defined, indicates that Perl should be built to * use the interpreter-based threading implementation. */ -/* USE_5005THREADS: - * This symbol, if defined, indicates that Perl should be built to - * use the 5.005-based threading implementation. - */ /* OLD_PTHREADS_API: * This symbol, if defined, indicates that Perl should * be built to use the old draft POSIX threads API. @@ -3506,11 +3502,7 @@ * try to use the various _r versions of library functions. * This is extremely experimental. */ -/*#define USE_5005THREADS /**/ #define USE_ITHREADS /**/ -#if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ -#endif /*#define OLD_PTHREADS_API /**/ /*#define USE_REENTRANT_API /**/ diff --git a/win32/config_H.gc b/win32/config_H.gc index 5564a417b6..2422466cc2 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -3493,10 +3493,6 @@ * This symbol, if defined, indicates that Perl should be built to * use the interpreter-based threading implementation. */ -/* USE_5005THREADS: - * This symbol, if defined, indicates that Perl should be built to - * use the 5.005-based threading implementation. - */ /* OLD_PTHREADS_API: * This symbol, if defined, indicates that Perl should * be built to use the old draft POSIX threads API. @@ -3506,11 +3502,7 @@ * try to use the various _r versions of library functions. * This is extremely experimental. */ -/*#define USE_5005THREADS /**/ #define USE_ITHREADS /**/ -#if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ -#endif /*#define OLD_PTHREADS_API /**/ /*#define USE_REENTRANT_API /**/ diff --git a/win32/config_H.vc b/win32/config_H.vc index f45fe40bed..8fcfb0fbfb 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -3493,10 +3493,6 @@ * This symbol, if defined, indicates that Perl should be built to * use the interpreter-based threading implementation. */ -/* USE_5005THREADS: - * This symbol, if defined, indicates that Perl should be built to - * use the 5.005-based threading implementation. - */ /* OLD_PTHREADS_API: * This symbol, if defined, indicates that Perl should * be built to use the old draft POSIX threads API. @@ -3506,11 +3502,7 @@ * try to use the various _r versions of library functions. * This is extremely experimental. */ -/*#define USE_5005THREADS /**/ #define USE_ITHREADS /**/ -#if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ -#endif /*#define OLD_PTHREADS_API /**/ /*#define USE_REENTRANT_API /**/ diff --git a/win32/config_H.vc64 b/win32/config_H.vc64 index dcc2592aef..5f1ff0fc8d 100644 --- a/win32/config_H.vc64 +++ b/win32/config_H.vc64 @@ -3493,10 +3493,6 @@ * This symbol, if defined, indicates that Perl should be built to * use the interpreter-based threading implementation. */ -/* USE_5005THREADS: - * This symbol, if defined, indicates that Perl should be built to - * use the 5.005-based threading implementation. - */ /* OLD_PTHREADS_API: * This symbol, if defined, indicates that Perl should * be built to use the old draft POSIX threads API. @@ -3506,11 +3502,7 @@ * try to use the various _r versions of library functions. * This is extremely experimental. */ -/*#define USE_5005THREADS /**/ #define USE_ITHREADS /**/ -#if defined(USE_5005THREADS) && !defined(USE_ITHREADS) -#define USE_THREADS /* until src is revised*/ -#endif /*#define OLD_PTHREADS_API /**/ /*#define USE_REENTRANT_API /**/ diff --git a/win32/config_sh.PL b/win32/config_sh.PL index cea5fef747..b31415d88a 100644 --- a/win32/config_sh.PL +++ b/win32/config_sh.PL @@ -49,11 +49,8 @@ my @noxs = FindExt::noxs_extensions(); my @known = sort(@dynamic,split(/\s+/,$opt{'staticext'}),@noxs); $opt{'known_extensions'} = join(' ',@known); -if (!$opt{'use5005threads'} || $opt{'use5005threads'} eq 'undef') - { - @dynamic = grep(!/Thread/,@dynamic); - @known = grep(!/Thread/,@dynamic); - } +@dynamic = grep(!/Thread/,@dynamic); +@known = grep(!/Thread/,@dynamic); $opt{'dynamic_ext'} = join(' ',@dynamic); $opt{'nonxs_ext'} = join(' ',@noxs); diff --git a/win32/makefile.mk b/win32/makefile.mk index b01923a837..59d20072b8 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -76,16 +76,6 @@ USE_IMP_SYS *= define USE_PERLIO = define # -# WARNING! This option is deprecated and will eventually go away (enable -# USE_ITHREADS instead). -# -# uncomment to enable threads-capabilities. This is incompatible with -# USE_ITHREADS, and is only here for people who may have come to rely -# on the experimental Thread support that was in 5.005. -# -#USE_5005THREADS *= define - -# # uncomment exactly one of the following # # Visual C++ 2.x @@ -236,28 +226,21 @@ CRYPT_FLAG = -DHAVE_DES_FCRYPT PERL_MALLOC *= undef -USE_5005THREADS *= undef - -.IF "$(USE_5005THREADS)" == "define" -USE_ITHREADS != undef -.ENDIF - USE_MULTI *= undef USE_ITHREADS *= undef USE_IMP_SYS *= undef USE_PERLIO *= undef USE_PERLCRT *= undef -.IF "$(USE_IMP_SYS)$(USE_MULTI)$(USE_5005THREADS)" == "defineundefundef" +.IF "$(USE_IMP_SYS)$(USE_MULTI)" == "defineundef" USE_MULTI != define .ENDIF .IF "$(USE_ITHREADS)$(USE_MULTI)" == "defineundef" USE_MULTI != define -USE_5005THREADS != undef .ENDIF -.IF "$(USE_MULTI)$(USE_5005THREADS)" != "undefundef" +.IF "$(USE_MULTI)" != "undef" BUILDOPT += -DPERL_IMPLICIT_CONTEXT .ENDIF @@ -280,9 +263,7 @@ WIN64 = undef .ENDIF .ENDIF -.IF "$(USE_5005THREADS)" == "define" -ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-thread -.ELIF "$(USE_MULTI)" == "define" +.IF "$(USE_MULTI)" == "define" ARCHNAME = MSWin32-$(PROCESSOR_ARCHITECTURE)-multi .ELSE .IF "$(USE_PERLIO)" == "define" @@ -823,9 +804,7 @@ CFG_VARS = \ _a=$(a) ~ \ lib_ext=$(a) ~ \ static_ext=$(STATIC_EXT) ~ \ - use5005threads=$(USE_5005THREADS) ~ \ useithreads=$(USE_ITHREADS) ~ \ - usethreads=$(USE_5005THREADS) ~ \ usemultiplicity=$(USE_MULTI) ~ \ useperlio=$(USE_PERLIO) ~ \ LINK_FLAGS=$(LINK_FLAGS:s/\/\\/) ~ \ diff --git a/win32/perllib.c b/win32/perllib.c index 4aeb7413da..f38dfa1fd6 100644 --- a/win32/perllib.c +++ b/win32/perllib.c @@ -261,7 +261,7 @@ DllMain(HANDLE hModule, /* DLL module handle */ PerlIO_cleanup() was done here but fails (B). */ EndSockets(); -#if defined(USE_5005THREADS) || defined(USE_ITHREADS) +#if defined(USE_ITHREADS) if (PL_curinterp) FREE_THREAD_KEY; #endif diff --git a/win32/win32.c b/win32/win32.c index 41788273b7..fdadcb2f6f 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -4750,12 +4750,8 @@ win32_signal_context(void) } return my_perl; #else -#ifdef USE_5005THREADS - return aTHX; -#else return PL_curinterp; #endif -#endif } @@ -4767,10 +4763,6 @@ win32_ctrlhandler(DWORD dwCtrlType) if (!my_perl) return FALSE; -#else -#ifdef USE_5005THREADS - dTHX; -#endif #endif switch(dwCtrlType) { diff --git a/win32/win32.h b/win32/win32.h index 897588544d..d1c2325026 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -368,12 +368,6 @@ struct thread_intern { WORD Wshowwindow; }; -#ifdef USE_5005THREADS -# ifndef USE_DECLSPEC_THREAD -# define HAVE_THREAD_INTERN -# endif /* !USE_DECLSPEC_THREAD */ -#endif /* USE_5005THREADS */ - #define HAVE_INTERP_INTERN typedef struct { long num; @@ -397,9 +391,7 @@ struct interp_intern { child_tab * pseudo_children; #endif void * internal_host; -#ifndef USE_5005THREADS struct thread_intern thr_intern; -#endif UINT timerid; unsigned poll_count; Sighandler_t sigtable[SIG_SIZE]; @@ -428,23 +420,13 @@ DllExport int win32_async_check(pTHX); #define w32_sighandler (PL_sys_intern.sigtable) #define w32_poll_count (PL_sys_intern.poll_count) #define w32_do_async (w32_poll_count++ > WIN32_POLL_INTERVAL) -#ifdef USE_5005THREADS -# define w32_strerror_buffer (thr->i.Wstrerror_buffer) -# define w32_getlogin_buffer (thr->i.Wgetlogin_buffer) -# define w32_crypt_buffer (thr->i.Wcrypt_buffer) -# define w32_servent (thr->i.Wservent) -# define w32_init_socktype (thr->i.Winit_socktype) -# define w32_use_showwindow (thr->i.Wuse_showwindow) -# define w32_showwindow (thr->i.Wshowwindow) -#else -# define w32_strerror_buffer (PL_sys_intern.thr_intern.Wstrerror_buffer) -# define w32_getlogin_buffer (PL_sys_intern.thr_intern.Wgetlogin_buffer) -# define w32_crypt_buffer (PL_sys_intern.thr_intern.Wcrypt_buffer) -# define w32_servent (PL_sys_intern.thr_intern.Wservent) -# define w32_init_socktype (PL_sys_intern.thr_intern.Winit_socktype) -# define w32_use_showwindow (PL_sys_intern.thr_intern.Wuse_showwindow) -# define w32_showwindow (PL_sys_intern.thr_intern.Wshowwindow) -#endif /* USE_5005THREADS */ +#define w32_strerror_buffer (PL_sys_intern.thr_intern.Wstrerror_buffer) +#define w32_getlogin_buffer (PL_sys_intern.thr_intern.Wgetlogin_buffer) +#define w32_crypt_buffer (PL_sys_intern.thr_intern.Wcrypt_buffer) +#define w32_servent (PL_sys_intern.thr_intern.Wservent) +#define w32_init_socktype (PL_sys_intern.thr_intern.Winit_socktype) +#define w32_use_showwindow (PL_sys_intern.thr_intern.Wuse_showwindow) +#define w32_showwindow (PL_sys_intern.thr_intern.Wshowwindow) /* UNICODE<>ANSI translation helpers */ /* Use CP_ACP when mode is ANSI */ diff --git a/win32/win32sck.c b/win32/win32sck.c index 947a42a28e..cd537b3e38 100644 --- a/win32/win32sck.c +++ b/win32/win32sck.c @@ -35,7 +35,7 @@ # define TO_SOCKET(x) (x) #endif /* USE_SOCKETS_AS_HANDLES */ -#if defined(USE_5005THREADS) || defined(USE_ITHREADS) +#if defined(USE_ITHREADS) #define StartSockets() \ STMT_START { \ if (!wsock_started) \ @@ -100,7 +100,7 @@ void set_socktype(void) { #ifdef USE_SOCKETS_AS_HANDLES -#if defined(USE_5005THREADS) || defined(USE_ITHREADS) +#if defined(USE_ITHREADS) dTHX; if (!w32_init_socktype) { #endif @@ -110,7 +110,7 @@ set_socktype(void) */ setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *)&iSockOpt, sizeof(iSockOpt)); -#if defined(USE_5005THREADS) || defined(USE_ITHREADS) +#if defined(USE_ITHREADS) w32_init_socktype = 1; } #endif diff --git a/win32/win32thread.c b/win32/win32thread.c index 1fdd0efc02..1f327d6d41 100644 --- a/win32/win32thread.c +++ b/win32/win32thread.c @@ -8,7 +8,7 @@ __declspec(thread) void *PL_current_context = NULL; void Perl_set_context(void *t) { -#if defined(USE_5005THREADS) || defined(USE_ITHREADS) +#if defined(USE_ITHREADS) # ifdef USE_DECLSPEC_THREAD Perl_current_context = t; # else @@ -22,7 +22,7 @@ Perl_set_context(void *t) void * Perl_get_context(void) { -#if defined(USE_5005THREADS) || defined(USE_ITHREADS) +#if defined(USE_ITHREADS) # ifdef USE_DECLSPEC_THREAD return Perl_current_context; # else @@ -35,79 +35,3 @@ Perl_get_context(void) return NULL; #endif } - -#ifdef USE_5005THREADS -void -Perl_init_thread_intern(struct perl_thread *athr) -{ -#ifndef USE_DECLSPEC_THREAD - - /* - * Initialize port-specific per-thread data in thr->i - * as only things we have there are just static areas for - * return values we don't _need_ to do anything but - * this is good practice: - */ - memset(&athr->i,0,sizeof(athr->i)); - -#endif -} - -void -Perl_set_thread_self(struct perl_thread *thr) -{ - /* Set thr->self. GetCurrentThread() retrurns a pseudo handle, need - this to convert it into a handle another thread can use. - */ - DuplicateHandle(GetCurrentProcess(), - GetCurrentThread(), - GetCurrentProcess(), - &thr->self, - 0, - FALSE, - DUPLICATE_SAME_ACCESS); -} - -int -Perl_thread_create(struct perl_thread *thr, thread_func_t *fn) -{ - DWORD junk; - unsigned long th; - - DEBUG_S(PerlIO_printf(Perl_debug_log, - "%p: create OS thread\n", thr)); -#ifdef USE_RTL_THREAD_API - /* See comment about USE_RTL_THREAD_API in win32thread.h */ -#if defined(__BORLANDC__) - th = _beginthreadNT(fn, /* start address */ - 0, /* stack size */ - (void *)thr, /* parameters */ - (void *)NULL, /* security attrib */ - 0, /* creation flags */ - (unsigned long *)&junk); /* tid */ - if (th == (unsigned long)-1) - th = 0; -#elif defined(_MSC_VER_) - th = _beginthreadex((void *)NULL, /* security attrib */ - 0, /* stack size */ - fn, /* start address */ - (void*)thr, /* parameters */ - 0, /* creation flags */ - (unsigned *)&junk); /* tid */ -#else /* compilers using CRTDLL.DLL only have _beginthread() */ - th = _beginthread(fn, /* start address */ - 0, /* stack size */ - (void*)thr); /* parameters */ - if (th == (unsigned long)-1) - th = 0; -#endif - thr->self = (HANDLE)th; -#else /* !USE_RTL_THREAD_API */ - thr->self = CreateThread(NULL, 0, fn, (void*)thr, 0, &junk); -#endif /* !USE_RTL_THREAD_API */ - DEBUG_S(PerlIO_printf(Perl_debug_log, - "%p: OS thread = %p, id=%ld\n", thr, thr->self, junk)); - return thr->self ? 0 : -1; -} -#endif - diff --git a/win32/win32thread.h b/win32/win32thread.h index a86ea61f04..8c02fa179f 100644 --- a/win32/win32thread.h +++ b/win32/win32thread.h @@ -154,16 +154,6 @@ extern __declspec(thread) void *PL_current_context; #define PERL_SET_CONTEXT(t) Perl_set_context(t) #endif -#if defined(USE_5005THREADS) -struct perl_thread; -int Perl_thread_create (struct perl_thread *thr, thread_func_t *fn); -void Perl_set_thread_self (struct perl_thread *thr); -void Perl_init_thread_intern (struct perl_thread *t); - -#define SET_THREAD_SELF(thr) Perl_set_thread_self(thr) - -#endif /* USE_5005THREADS */ - END_EXTERN_C #define INIT_THREADS NOOP |