dol: initial dol commit
[jump.git] / dol / src / dol / visitor / cbe / lib / dol.h
diff --git a/dol/src/dol/visitor/cbe/lib/dol.h b/dol/src/dol/visitor/cbe/lib/dol.h
new file mode 100644 (file)
index 0000000..2838938
--- /dev/null
@@ -0,0 +1,28 @@
+#ifndef __DOL_H__
+#define __DOL_H__
+
+//structure for local memory of process
+typedef struct _local_states *LocalState;
+
+//structure for process
+struct _process;
+
+//
+typedef void (*ProcessInit)(struct _process*);
+typedef int (*ProcessFire)(struct _process*);
+typedef void *WPTR;
+
+typedef struct _process {
+    LocalState     local;
+    ProcessInit    init;
+    ProcessFire    fire;
+    WPTR           wptr;
+} DOLProcess;
+
+void DOL_read(void *port, void *buf, int len, DOLProcess *process);
+void DOL_write(void *port, void *buf, int len, DOLProcess *process);
+void DOL_detach(DOLProcess *process);
+int getIndex(const char* string, char* tokens, int indexNumber); 
+int *createPort(int *port, int base, int number_of_indices, int index_range_pairs, ...); 
+
+#endif