/* $Id: scheduler.h,v 1.8 2004/04/03 04:17:37 jmuelmen Exp $ */ /* Task scheduler */ #ifndef _AMBUSH_SCHED_INC_ #define _AMBUSH_SCHED_INC_ #include "parse.h" #include "buf.h" /* how often should the ifbuffer run (in us)? */ #define IFBUF_INT 1000000 int ifbuf_buf (parse_action_t *); void ifbuf_lock (); void ifbuf_unlock (); parse_action_t *ifbuf_get_idx (int); int ifbuf_clear (); int ifbuf_process (); void ifbuf_dump (); void ifbuf_init (); void *ifbuf (void *); int atbuf_buf (parse_action_t *); void atbuf_lock (); void atbuf_unlock (); void *atbuf (void *); int schedbuf_buf (parse_action_t *); void schedbuf_lock (); void schedbuf_unlock (); void *schedbuf (void *); void *sequence (void *); #define QUEUE_INT 10000 void queue_init (); void *queue (void *); int enqueue (func_t f, value_t *argv, int argc, value_t *ret); /* are we processing an atomic set of instructions? */ int get_atomic (); int set_atomic (int); /* are we processing a sequential statement? */ buf_t *get_sequential (); buf_t * set_sequential (buf_t *); #endif /* _AMBUSH_SCHED_INC_ */