Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VCilk_impls > VCilk__MC_shared_impl
comparison VCilk.h @ 5:5494943ed3a4
Seans development tree
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Wed, 11 May 2011 15:29:58 +0200 |
| parents | 2845dca6a28b |
| children | 58d0c2b1d6a4 |
comparison
equal
deleted
inserted
replaced
| 1:9a507043fbff | 2:21e78455a056 |
|---|---|
| 26 typedef void (*PtrToAtomicFn ) ( void * ); //executed atomically in master | 26 typedef void (*PtrToAtomicFn ) ( void * ); //executed atomically in master |
| 27 | 27 |
| 28 //=========================================================================== | 28 //=========================================================================== |
| 29 | 29 |
| 30 | 30 |
| 31 /*WARNING: assembly hard-codes position of endInstrAddr as first field | |
| 32 */ | |
| 33 typedef struct | |
| 34 { | |
| 35 void *endInstrAddr; | |
| 36 int32 hasBeenStarted; | |
| 37 int32 hasFinished; | |
| 38 PrivQueueStruc *waitQ; | |
| 39 } | |
| 40 VCilkSingleton; | |
| 41 | |
| 31 /*Semantic layer-specific data sent inside a request from lib called in app | 42 /*Semantic layer-specific data sent inside a request from lib called in app |
| 32 * to request handler called in MasterLoop | 43 * to request handler called in MasterLoop |
| 33 */ | 44 */ |
| 34 enum VCilkReqType | 45 enum VCilkReqType |
| 35 { | 46 { |
| 36 syncReq = 1, | 47 syncReq = 1, |
| 37 mallocReq, | 48 mallocReq, |
| 38 freeReq, | 49 freeReq, |
| 39 singleton, | 50 singleton_fn_start, |
| 51 singleton_fn_end, | |
| 52 singleton_data_start, | |
| 53 singleton_data_end, | |
| 40 atomic, | 54 atomic, |
| 41 trans_start, | 55 trans_start, |
| 42 trans_end | 56 trans_end |
| 43 }; | 57 }; |
| 44 | 58 |
| 52 VirtProcrFnPtr fnPtr; | 66 VirtProcrFnPtr fnPtr; |
| 53 void *initData; | 67 void *initData; |
| 54 int32 coreToSpawnOnto; | 68 int32 coreToSpawnOnto; |
| 55 | 69 |
| 56 int32 singletonID; | 70 int32 singletonID; |
| 57 void *endJumpPt; | 71 VCilkSingleton **singletonPtrAddr; |
| 58 | 72 |
| 59 PtrToAtomicFn fnToExecInMaster; | 73 PtrToAtomicFn fnToExecInMaster; |
| 60 void *dataForFn; | 74 void *dataForFn; |
| 61 | 75 |
| 62 int32 transID; | 76 int32 transID; |
| 77 int32 numVirtPr; | 91 int32 numVirtPr; |
| 78 int32 nextCoreToGetNewPr; | 92 int32 nextCoreToGetNewPr; |
| 79 int32 primitiveStartTime; | 93 int32 primitiveStartTime; |
| 80 | 94 |
| 81 //fix limit on num with dynArray | 95 //fix limit on num with dynArray |
| 82 int32 singletonHasBeenExecutedFlags[NUM_STRUCS_IN_SEM_ENV]; | 96 VCilkSingleton fnSingletons[NUM_STRUCS_IN_SEM_ENV]; |
| 83 VCilkTrans transactionStrucs[NUM_STRUCS_IN_SEM_ENV]; | 97 VCilkTrans transactionStrucs[NUM_STRUCS_IN_SEM_ENV]; |
| 84 } | 98 } |
| 85 VCilkSemEnv; | 99 VCilkSemEnv; |
| 86 | 100 |
| 87 typedef struct _TransListElem TransListElem; | 101 typedef struct _TransListElem TransListElem; |
| 150 VCilk__dissipate_procr( VirtProcr *procrToDissipate ); | 164 VCilk__dissipate_procr( VirtProcr *procrToDissipate ); |
| 151 | 165 |
| 152 | 166 |
| 153 //======================= Concurrency Stuff ====================== | 167 //======================= Concurrency Stuff ====================== |
| 154 void | 168 void |
| 155 VCilk__start_singleton( int32 singletonID, void *endSingletonLabelAddr, | 169 VCilk__start_fn_singleton( int32 singletonID, VirtProcr *animPr ); |
| 156 VirtProcr *animPr ); | 170 |
| 171 void | |
| 172 VCilk__end_fn_singleton( int32 singletonID, VirtProcr *animPr ); | |
| 173 | |
| 174 void | |
| 175 VCilk__start_data_singleton( VCilkSingleton **singeltonAddr, VirtProcr *animPr ); | |
| 176 | |
| 177 void | |
| 178 VCilk__end_data_singleton( VCilkSingleton **singletonAddr, VirtProcr *animPr ); | |
| 157 | 179 |
| 158 void | 180 void |
| 159 VCilk__animate_short_fn_in_isolation( PtrToAtomicFn ptrToFnToExecInMaster, | 181 VCilk__animate_short_fn_in_isolation( PtrToAtomicFn ptrToFnToExecInMaster, |
| 160 void *data, VirtProcr *animPr ); | 182 void *data, VirtProcr *animPr ); |
| 161 | 183 |
