Message-ID: <Pine.LNX.4.21.
0107110855070.11688-100000@mako.covalent.net>
p4raw-id: //depot/perl@11281
PERL_SYS_INIT3(&argc,&argv,&env);
+#ifdef USE_ITHREADS
+ PTHREAD_ATFORK(Perl_atfork_lock,
+ Perl_atfork_unlock,
+ Perl_atfork_unlock);
+#endif
+
if (!PL_do_undump) {
my_perl = perl_alloc();
if (!my_perl)
#else
# if defined(USE_ITHREADS)
-static void S_atfork_lock(void);
-static void S_atfork_unlock(void);
-
/* this is called in parent before the fork() */
-static void
-S_atfork_lock(void)
+void
+Perl_atfork_lock(void)
{
/* locks must be held in locking order (if any) */
#ifdef MYMALLOC
}
/* this is called in both parent and child after the fork() */
-static void
-S_atfork_unlock(void)
+void
+Perl_atfork_unlock(void)
{
/* locks must be released in same order as in S_atfork_lock() */
#ifdef MYMALLOC
ALLOC_THREAD_KEY; \
PERL_SET_THX(my_perl); \
OP_REFCNT_INIT; \
- PTHREAD_ATFORK(S_atfork_lock, \
- S_atfork_unlock, \
- S_atfork_unlock); \
} \
else { \
PERL_SET_THX(my_perl); \