24 lines
393 B
C
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
|