diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-21 18:28:22 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-11-21 18:28:22 +0000 |
commit | 54b9620dd49f76536ba0792f6f471615a414bd6a (patch) | |
tree | 0f7080854c047d90b09822aec3b81dd2fcbabd89 /perl.h | |
parent | ff2faa2b5a0809a5124aa90fc1d07503e49a73fb (diff) | |
download | perl-54b9620dd49f76536ba0792f6f471615a414bd6a.tar.gz |
$_ is now per-thread (rather a lot of changes). Only tested under
*-linux-thread at the moment.
p4raw-id: //depot/perl@274
Diffstat (limited to 'perl.h')
-rw-r--r-- | perl.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -462,9 +462,13 @@ register struct op *op asm(stringify(OP_IN_REGISTER)); #ifdef USE_THREADS # define ERRSV (thr->errsv) # define ERRHV (thr->errhv) +# define DEFSV *av_fetch(thr->threadsv, find_threadsv("_"), FALSE) +# define SAVE_DEFSV save_threadsv(find_threadsv("_")) #else # define ERRSV GvSV(errgv) # define ERRHV GvHV(errgv) +# define DEFSV GvSV(defgv) +# define SAVE_DEFSV SAVESPTR(GvSV(defgv)) #endif /* USE_THREADS */ #ifndef errno @@ -1349,7 +1353,7 @@ int runops_standard _((void)); int runops_debug _((void)); #endif -#define PER_THREAD_MAGICALS "123456789&`'+/.,\\\";^-%=|~:\001\005!@" +#define THREADSV_NAMES "_123456789&`'+/.,\\\";^-%=|~:\001\005!@" /****************/ /* Truly global */ @@ -1367,7 +1371,7 @@ EXT struct 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 * per_thread_magicals INIT(PER_THREAD_MAGICALS); +EXT char * threadsv_names INIT(THREADSV_NAMES); #ifdef FAKE_THREADS EXT struct thread * thr; /* Currently executing (fake) thread */ #endif |