hop-2012/harness.h

24 lines
393 B
C

#ifndef cmsg_harness_h
#define cmsg_harness_h
typedef struct Process {
ucontext_t context;
struct Process *link;
void *stack_base;
} Process;
typedef struct ProcessQueue {
int count;
Process *head;
Process *tail;
} ProcessQueue;
extern Process *current_process;
extern void yield(void);
extern void spawn(void (*f)(void *), void *arg);
extern void boot_harness(void);
#endif