newly realized mlp successfully issues and runs root SESE as a work unit
[IRC.git] / Robust / src / Runtime / mlp_runtime.h
1 #ifndef __MLP_RUNTIME__
2 #define __MLP_RUNTIME__
3
4
5 #include <pthread.h>
6 #include "Queue.h"
7 #include "psemaphore.h"
8
9
10 // forward delcarations
11 //struct SESErecord_t;
12
13
14 // note that this record is never used other than
15 // to cast a customized record and have easy access
16 // the common fields listed here
17 typedef struct SESErecord_t {  
18
19   // the identifier for the class of sese's that
20   // are instances of one particular static code block
21   int classID;
22
23   // the lock guards the following data SESE's
24   // use to coordinate with one another
25   pthread_mutex_t lock;
26   struct Queue*   forwardList;
27   int             doneExecuting;
28
29 } SESErecord;
30
31
32 /*
33 typedef struct SESEvarSrc_t {
34   void* seseRecord;
35   int         offset;
36 } SESEvarSrc;
37 */
38
39
40 // simple mechanical allocation and 
41 // deallocation of SESE records
42 void* mlpCreateSESErecord( int classID, int size );
43 void  mlpDestroySESErecord( void* seseRecord );
44
45
46 // main library functions
47 void mlpInit();
48 void mlpIssue( void* seseRecord );
49 void mlpStall( void* seseRecord );
50
51
52 #endif /* __MLP_RUNTIME__ */