* Copyright (c) 1997-2002, Larry Wall
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
typedef struct perl_thread
*perl_os_thread
;
/* With fake threads, thr is global(ish) so we don't need dTHR */
#define dTHR extern int errno
struct perl_thread
* thread
;
struct perl_wait_queue
* next
;
typedef struct perl_wait_queue
*perl_cond
;
/* Ask thread.h to include our per-thread extras */
#define HAVE_THREAD_INTERN
perl_os_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) \
(t)->i.next_run = (t)->i.prev_run = (t); \
* Note that SCHEDULE() is only callable from pp code (which
* must be expecting to be restarted). We'll have to do
* something a bit different for XS code.
#define SCHEDULE() return schedule(), PL_op
#define COND_INIT(c) perl_cond_init(c)
#define COND_SIGNAL(c) perl_cond_signal(c)
#define COND_BROADCAST(c) perl_cond_broadcast(c)
#define COND_WAIT(c, m) \
#define THREAD_CREATE(t, f) f((t))
#define THREAD_POST_CREATE(t) NOOP