Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > Vthread_impls > Vthread_MC_shared_impl
diff VPThread.h @ 3:505d3c674ce8
Nov 20 PLDI final version -- working data singletons, meas hist macros in plugin
| author | Me |
|---|---|
| date | Sat, 20 Nov 2010 08:39:58 +0100 |
| parents | e960a8d18f7c |
| children | ce4ad44fcc23 |
line diff
1.1 --- a/VPThread.h Tue Nov 16 16:04:29 2010 +0100 1.2 +++ b/VPThread.h Sat Nov 20 08:39:58 2010 +0100 1.3 @@ -31,6 +31,17 @@ 1.4 //=========================================================================== 1.5 1.6 1.7 +/*WARNING: assembly hard-codes position of endInstrAddr as first field 1.8 + */ 1.9 +typedef struct 1.10 + { 1.11 + void *endInstrAddr; 1.12 + int32 hasBeenStarted; 1.13 + int32 hasFinished; 1.14 + PrivQueueStruc *waitQ; 1.15 + } 1.16 +VPThdSingleton; 1.17 + 1.18 /*Semantic layer-specific data sent inside a request from lib called in app 1.19 * to request handler called in MasterLoop 1.20 */ 1.21 @@ -45,8 +56,10 @@ 1.22 make_procr, 1.23 malloc_req, 1.24 free_req, 1.25 - singleton_start, 1.26 - singleton_end, 1.27 + singleton_fn_start, 1.28 + singleton_fn_end, 1.29 + singleton_data_start, 1.30 + singleton_data_end, 1.31 atomic, 1.32 trans_start, 1.33 trans_end 1.34 @@ -66,7 +79,7 @@ 1.35 void *ptrToFree; 1.36 1.37 int32 singletonID; 1.38 - void *endJumpPt; 1.39 + VPThdSingleton **singletonPtrAddr; 1.40 1.41 PtrToAtomicFn fnToExecInMaster; 1.42 void *dataForFn; 1.43 @@ -83,14 +96,6 @@ 1.44 } 1.45 VPThdTrans; 1.46 1.47 -typedef struct 1.48 - { 1.49 - int32 hasBeenStarted; 1.50 - int32 hasFinished; 1.51 - void *endInstrAddr; 1.52 - PrivQueueStruc *waitQ; 1.53 - } 1.54 -VPThdSingleton; 1.55 1.56 typedef struct 1.57 { 1.58 @@ -143,8 +148,7 @@ 1.59 void *applicationGlobals; 1.60 1.61 //fix limit on num with dynArray 1.62 - VPThdSingleton singletons[NUM_STRUCS_IN_SEM_ENV]; 1.63 - void *singletonEndInstrAddr; 1.64 + VPThdSingleton fnSingletons[NUM_STRUCS_IN_SEM_ENV]; 1.65 1.66 VPThdTrans transactionStrucs[NUM_STRUCS_IN_SEM_ENV]; 1.67 } 1.68 @@ -199,12 +203,17 @@ 1.69 1.70 1.71 //======================= 1.72 +void 1.73 +VPThread__start_fn_singleton( int32 singletonID, VirtProcr *animPr ); 1.74 1.75 void 1.76 -VPThread__end_singleton( int32 singletonID, VirtProcr *animPr ); 1.77 +VPThread__end_fn_singleton( int32 singletonID, VirtProcr *animPr ); 1.78 1.79 -inline void 1.80 -VPThread__start_singleton( int32 singletonID, VirtProcr *animPr ); 1.81 +void 1.82 +VPThread__start_data_singleton( VPThdSingleton **singeltonAddr, VirtProcr *animPr ); 1.83 + 1.84 +void 1.85 +VPThread__end_data_singleton( VPThdSingleton **singletonAddr, VirtProcr *animPr ); 1.86 1.87 void 1.88 VPThread__animate_short_fn_in_isolation( PtrToAtomicFn ptrToFnToExecInMaster, 1.89 @@ -237,5 +246,8 @@ 1.90 void 1.91 VPThread__cleanup_after_shutdown(); 1.92 1.93 +void inline 1.94 +resume_procr( VirtProcr *procr, VPThdSemEnv *semEnv ); 1.95 + 1.96 #endif /* _VPThread_H */ 1.97
