This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix pp_hot.c:get_db_sub core dump when perl debugger used.
[perl5.git] / fakethr.h
CommitLineData
d6949db4
MB
1typedef int perl_mutex;
2typedef int perl_key;
3
4struct perl_wait_queue {
5 struct thread * thread;
6 struct perl_wait_queue * next;
7};
8typedef struct perl_wait_queue *perl_cond;
9
f826a10b
MB
10/* Ask thread.h to include our per-thread extras */
11#define HAVE_THREAD_INTERN
d6949db4
MB
12struct thread_intern {
13 perl_thread next_run, prev_run; /* Linked list of runnable threads */
14 perl_cond wait_queue; /* Wait queue that we are waiting on */
15 IV private; /* Holds data across time slices */
16 I32 savemark; /* Holds MARK for thread join values */
17};
f826a10b
MB
18
19#define init_thread_intern(t) \
20 STMT_START { \
21 t->Tself = (t); \
22 (t)->i.next_run = (t)->i.prev_run = (t); \
23 (t)->i.wait_queue = 0; \
24 (t)->i.private = 0; \
25 } STMT_END
26