dol: initial dol commit
[jump.git] / dol / src / dol / visitor / cbe / lib / dol.h
1 #ifndef __DOL_H__
2 #define __DOL_H__
3
4 //structure for local memory of process
5 typedef struct _local_states *LocalState;
6
7 //structure for process
8 struct _process;
9
10 //
11 typedef void (*ProcessInit)(struct _process*);
12 typedef int (*ProcessFire)(struct _process*);
13 typedef void *WPTR;
14
15 typedef struct _process {
16     LocalState     local;
17     ProcessInit    init;
18     ProcessFire    fire;
19     WPTR           wptr;
20 } DOLProcess;
21
22 void DOL_read(void *port, void *buf, int len, DOLProcess *process);
23 void DOL_write(void *port, void *buf, int len, DOLProcess *process);
24 void DOL_detach(DOLProcess *process);
25 int getIndex(const char* string, char* tokens, int indexNumber); 
26 int *createPort(int *port, int base, int number_of_indices, int index_range_pairs, ...); 
27
28 #endif