diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-09-22 16:02:37 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-09-22 16:02:37 +0000 |
commit | 07b7370725c6ec32f15c00e2d8d38d18f4b75a2d (patch) | |
tree | b71ca26eb63d153ac3532c533e89b09266239001 /thread.h | |
parent | b83535cb553b94cd457aaceadbc320b293a81b7c (diff) | |
download | perl-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.h | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -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) |