summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>1997-11-26 00:50:10 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>1997-11-26 00:50:10 +0000
commitbe679a9b8e5b022d9dbcf8917ef39627830b4ca2 (patch)
tree182157292fc7453c5fab3d80135d08f669138dc8 /perl.h
parentd40103885dfef00fdafa10024e6e4d5e414d1403 (diff)
parentfb54173c01796b37b2259a6538d910d610b2edbb (diff)
downloadperl-be679a9b8e5b022d9dbcf8917ef39627830b4ca2.tar.gz
Integrate mainline as of _55
p4raw-id: //depot/ansiperl@305
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/perl.h b/perl.h
index 724384f9e9..c05d4a91c3 100644
--- a/perl.h
+++ b/perl.h
@@ -1058,7 +1058,7 @@ union any {
};
#ifdef USE_THREADS
-#define ARGSproto struct thread *thr
+#define ARGSproto struct perl_thread *thr
#else
#define ARGSproto void
#endif /* USE_THREADS */
@@ -1343,6 +1343,14 @@ typedef Sighandler_t Sigsave_t;
# define RUNOPS_DEFAULT runops_standard
#endif
+#ifdef MYMALLOC
+# define MALLOC_INIT MUTEX_INIT(&malloc_mutex)
+# define MALLOC_TERM MUTEX_DESTROY(&malloc_mutex)
+#else
+# define MALLOC_INIT
+# define MALLOC_TERM
+#endif
+
/*
* These need prototyping here because <proto.h> isn't
* included until after runops is initialised.
@@ -1362,18 +1370,18 @@ int runops_debug _((void));
/* global state */
EXT PerlInterpreter * curinterp; /* currently running interpreter */
#ifdef USE_THREADS
-EXT perl_key thr_key; /* For per-thread struct thread ptr */
+EXT perl_key thr_key; /* For per-thread struct perl_thread* */
EXT perl_mutex sv_mutex; /* Mutex for allocating SVs in sv.c */
EXT perl_mutex malloc_mutex; /* Mutex for malloc */
EXT perl_mutex eval_mutex; /* Mutex for doeval */
EXT perl_cond eval_cond; /* Condition variable for doeval */
-EXT struct thread * eval_owner; /* Owner thread for doeval */
+EXT struct perl_thread * eval_owner; /* Owner thread for doeval */
EXT int nthreads; /* Number of threads currently */
EXT perl_mutex threads_mutex; /* Mutex for nthreads and thread list */
EXT perl_cond nthreads_cond; /* Condition variable for nthreads */
EXT char * threadsv_names INIT(THREADSV_NAMES);
#ifdef FAKE_THREADS
-EXT struct thread * thr; /* Currently executing (fake) thread */
+EXT struct perl_thread * thr; /* Currently executing (fake) thread */
#endif
#endif /* USE_THREADS */
@@ -1959,7 +1967,7 @@ IEXT SV * Imess_sv;
#ifdef USE_THREADS
/* threads stuff */
-IEXT SV * Ithrsv; /* holds struct thread for main thread */
+IEXT SV * Ithrsv; /* holds struct perl_thread for main thread */
#endif /* USE_THREADS */
#undef IEXT
@@ -2301,6 +2309,10 @@ EXT bool numeric_local INIT(TRUE); /* Assume local numerics */
#define PERL_SCRIPT_MODE "r"
#endif
+#ifndef PERL_SCRIPT_MODE
+#define PERL_SCRIPT_MODE "r"
+#endif
+
/*
* nice_chunk and nice_chunk size need to be set
* and queried under the protection of sv_mutex