1 #ifndef __MLP_RUNTIME__
2 #define __MLP_RUNTIME__
7 #include "psemaphore.h"
18 // forward declaration of pointer type
19 typedef struct SESEcommon_t* SESEcommon_p;
21 // these fields are common to any SESE, and casting the
22 // generated SESE record to this can be used, because
23 // the common structure is always the first item in a
24 // customized SESE record
25 typedef struct SESEcommon_t {
27 // the identifier for the class of sese's that
28 // are instances of one particular static code block
31 // a parent waits on this semaphore when stalling on
32 // this child, the child gives it at its SESE exit
36 // the lock guards the following data SESE's
37 // use to coordinate with one another
40 struct Queue* forwardList;
41 int unresolvedDependencies;
43 pthread_cond_t doneCond;
46 pthread_cond_t runningChildrenCond;
47 int numRunningChildren;
54 // a thread-local stack of SESE's that have called a
56 extern __thread struct Queue* seseCallStack;
59 // simple mechanical allocation and
60 // deallocation of SESE records
61 void* mlpCreateSESErecord( int size );
62 void mlpDestroySESErecord( void* seseRecord );
65 #endif /* __MLP_RUNTIME__ */