summaryrefslogtreecommitdiff
path: root/win32/perlhost.h
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-24 15:35:12 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-24 15:35:12 +0000
commitc00206c8463e3564bde598f9aa9e8be52b3f27e3 (patch)
tree6246012063f6a44941350e23856e345139b11c5c /win32/perlhost.h
parent56e90b21f82f04af4f0a1a957067569857cd0ce2 (diff)
downloadperl-c00206c8463e3564bde598f9aa9e8be52b3f27e3.tar.gz
assorted little nits
p4raw-id: //depot/perl@4882
Diffstat (limited to 'win32/perlhost.h')
-rw-r--r--win32/perlhost.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/win32/perlhost.h b/win32/perlhost.h
index 93cb4580b0..4b4ad586a4 100644
--- a/win32/perlhost.h
+++ b/win32/perlhost.h
@@ -1628,7 +1628,7 @@ PerlProcSignal(struct IPerlProc* piPerl, int sig, Sighandler_t subcode)
}
#ifdef USE_ITHREADS
-static DWORD WINAPI
+static THREAD_RET_TYPE
win32_start_child(LPVOID arg)
{
PerlInterpreter *my_perl = (PerlInterpreter*)arg;
@@ -1740,9 +1740,14 @@ PerlProcFork(struct IPerlProc* piPerl)
id = win32_start_child((LPVOID)new_perl);
PERL_SET_INTERP(aTHXo);
# else
+# ifdef USE_RTL_THREAD_API
+ handle = (HANDLE)_beginthreadex((void*)NULL, 0, win32_start_child,
+ (void*)new_perl, 0, (unsigned*)&id);
+# else
handle = CreateThread(NULL, 0, win32_start_child,
(LPVOID)new_perl, 0, &id);
- PERL_SET_INTERP(aTHXo);
+# endif
+ PERL_SET_INTERP(aTHXo); /* XXX perl_clone*() set TLS */
if (!handle)
Perl_croak(aTHX_ "panic: pseudo fork() failed");
w32_pseudo_child_handles[w32_num_pseudo_children] = handle;