1 #ifndef __MLP_RUNTIME__
2 #define __MLP_RUNTIME__
9 // value mode means the variable's value
10 // is present in the SESEvar struct
11 #define SESEvar_MODE_VALUE 3001
13 // static move means the variable's value
14 // will come from a statically known SESE
15 #define SESEvar_MODE_STATIC 3002
17 // dynamic mode means the variable's value
18 // will come from an SESE, and the exact
19 // SESE will be determined at runtime
20 #define SESEvar_MODE_DYNAMIC 3003
23 // a forward delcaration for SESEvar
30 // the value when it is known will be placed
31 // in this location, which can be accessed
32 // as a variety of types
38 long long sesetype_long;
41 double sesetype_double;
42 void* sesetype_object;
45 // a statically or dynamically known SESE
46 // to gather the variable's value from
47 // if source==NULL it indicates the root
48 // SESE, which has no record, just normal
50 struct SESErecord* source;
56 // the identifier for the class of sese's that
57 // are instances of one particular static code block
60 // not globally unqiue, but each parent ensures that
61 // its children have unique identifiers, including to
65 // for state of vars after issue
68 // when this sese is ready to be invoked,
69 // allocate and fill in this structure, and
70 // the primitives will be passed out of the
71 // above var array at the call site
74 // use a list of SESErecords and a lock to let
75 // consumers tell this SESE who wants values
77 pthread_mutex_t forwardListLock;// = PTHREAD_MUTUX_INITIALIZER;
78 struct Queue* forwardList;
84 struct SESErecord* mlpGetCurrent();
85 struct SESErecord* mlpSchedule();
87 void mlpIssue ( struct SESErecord* sese );
88 void mlpStall ( struct SESErecord* sese );
89 void mlpNotifyExit( struct SESErecord* sese );
92 extern struct SESErecord* rootsese;
95 #endif /* __MLP_RUNTIME__ */