X-Git-Url: http://sraa.de/git/?a=blobdiff_plain;f=dol%2Fsrc%2Fdol%2Fvisitor%2Fcell%2Flib%2Fdol.h;fp=dol%2Fsrc%2Fdol%2Fvisitor%2Fcell%2Flib%2Fdol.h;h=297f8c544bd0e0795cca8e17a58856c4940f2597;hb=8c411cf24ed0eb889191aaeafd8fa1e69081df42;hp=0000000000000000000000000000000000000000;hpb=dea7a4fb1ed110d3ce6e6d9255103d724bd66c0e;p=jump.git diff --git a/dol/src/dol/visitor/cell/lib/dol.h b/dol/src/dol/visitor/cell/lib/dol.h new file mode 100644 index 0000000..297f8c5 --- /dev/null +++ b/dol/src/dol/visitor/cell/lib/dol.h @@ -0,0 +1,34 @@ +#ifndef __DOL_H__ +#define __DOL_H__ + +// structure for local memory of process +typedef struct _local_states *LocalState; + +// structure for process +struct _process; + +// standard functions +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); + +unsigned DOL_reserve(void* port, void** destination, unsigned len, DOLProcess* process); +void DOL_release(void* port, DOLProcess* process); +unsigned DOL_capture(void* port, void** destination, unsigned len, DOLProcess* process); +void DOL_consume(void* port, 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