summaryrefslogtreecommitdiff
path: root/thread.h
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-09-22 16:02:37 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-09-22 16:02:37 +0000
commit07b7370725c6ec32f15c00e2d8d38d18f4b75a2d (patch)
treeb71ca26eb63d153ac3532c533e89b09266239001 /thread.h
parentb83535cb553b94cd457aaceadbc320b293a81b7c (diff)
downloadperl-07b7370725c6ec32f15c00e2d8d38d18f4b75a2d.tar.gz
struct thread now stored in an SV and uses '~'-magic for access.
p4raw-id: //depot/perl@69
Diffstat (limited to 'thread.h')
-rw-r--r--thread.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/thread.h b/thread.h
index 60ff29e450..f7ca06caa0 100644
--- a/thread.h
+++ b/thread.h
@@ -82,6 +82,7 @@ struct thread *getTHR _((void));
struct thread {
perl_thread Tself;
+ SV * Toursv;
/* The fields that used to be global */
SV ** Tstack_base;
@@ -166,15 +167,17 @@ struct thread {
typedef struct thread *Thread;
/* Values and macros for thrflags */
-#define THR_STATE_MASK 3
-#define THR_NORMAL 0
-#define THR_DETACHED 1
-#define THR_JOINED 2
-#define THR_DEAD 3
+#define THRf_STATE_MASK 3
+#define THRf_NORMAL 0
+#define THRf_DETACHED 1
+#define THRf_JOINED 2
+#define THRf_DEAD 3
-#define ThrSTATE(t) (t->Tthrflags & THR_STATE_MASK)
+#define THRf_DIE_FATAL 4
+
+#define ThrSTATE(t) (t->Tthrflags & THRf_STATE_MASK)
#define ThrSETSTATE(t, s) STMT_START { \
- (t)->Tthrflags &= ~THR_STATE_MASK; \
+ (t)->Tthrflags &= ~THRf_STATE_MASK; \
(t)->Tthrflags |= (s); \
DEBUG_L(fprintf(stderr, "thread 0x%lx set to state %d\n", \
(unsigned long)(t), (s))); \
@@ -231,6 +234,7 @@ typedef struct condpair {
#undef localizing
#define self (thr->Tself)
+#define oursv (thr->Toursv)
#define stack_base (thr->Tstack_base)
#define stack_sp (thr->Tstack_sp)
#define stack_max (thr->Tstack_max)