diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-10-15 16:55:10 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-10-15 16:55:10 +0000 |
commit | f826a10b5944692b2da706f4a0ac5056f28e8c6d (patch) | |
tree | 6584f7f79b06c00d0ff30301a24e4ac72c19bf2e /fakethr.h | |
parent | 1fd28e8719b5948a213df0351e0ab4964a56a071 (diff) | |
download | perl-f826a10b5944692b2da706f4a0ac5056f28e8c6d.tar.gz |
Add HAVE_THREAD_INTERN for platform-dependent struct thread additions.
Fix ThrSETSTATE not to lock t->mutex itself.
p4raw-id: //depot/perl@130
Diffstat (limited to 'fakethr.h')
-rw-r--r-- | fakethr.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -7,9 +7,20 @@ struct perl_wait_queue { }; typedef struct perl_wait_queue *perl_cond; +/* Ask thread.h to include our per-thread extras */ +#define HAVE_THREAD_INTERN struct thread_intern { perl_thread next_run, prev_run; /* Linked list of runnable threads */ perl_cond wait_queue; /* Wait queue that we are waiting on */ IV private; /* Holds data across time slices */ I32 savemark; /* Holds MARK for thread join values */ }; + +#define init_thread_intern(t) \ + STMT_START { \ + t->Tself = (t); \ + (t)->i.next_run = (t)->i.prev_run = (t); \ + (t)->i.wait_queue = 0; \ + (t)->i.private = 0; \ + } STMT_END + |