Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff ProcrContext.h @ 139:99798e4438a6
Merge of Malloc2 and inter master requests
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Mon, 19 Sep 2011 16:12:01 +0200 |
| parents | a9b72021f053 |
| children |
line diff
1.1 --- a/ProcrContext.h Wed Sep 07 19:36:46 2011 +0200 1.2 +++ b/ProcrContext.h Mon Sep 19 16:12:01 2011 +0200 1.3 @@ -5,11 +5,56 @@ 1.4 * Author: seanhalle@yahoo.com 1.5 * 1.6 */ 1.7 - 1.8 #ifndef _ProcrContext_H 1.9 #define _ProcrContext_H 1.10 #define _GNU_SOURCE 1.11 1.12 +typedef struct _VirtProcr VirtProcr; 1.13 +typedef struct _VMSReqst VMSReqst; 1.14 +typedef void (*VirtProcrFnPtr) ( void *, VirtProcr * ); //initData, animPr 1.15 + 1.16 + 1.17 +#include "VMS_primitive_data_types.h" 1.18 +#include "scheduling.h" 1.19 + 1.20 +/*WARNING: re-arranging this data structure could cause VP switching 1.21 + * assembly code to fail -- hard-codes offsets of fields 1.22 + */ 1.23 +struct _VirtProcr 1.24 + { int procrID; //for debugging -- count up each time create 1.25 + int coreAnimatedBy; 1.26 + void *startOfStack; 1.27 + void *stackPtr; 1.28 + void *framePtr; 1.29 + void *nextInstrPt; 1.30 + 1.31 + void *coreLoopStartPt; //allows proto-runtime to be linked later 1.32 + void *coreLoopFramePtr; //restore before jmp back to core loop 1.33 + void *coreLoopStackPtr; //restore before jmp back to core loop 1.34 + 1.35 + void *initialData; 1.36 + 1.37 + SchedSlot *schedSlot; 1.38 + VMSReqst *requests; 1.39 + 1.40 + void *semanticData; 1.41 + void *dataRetFromReq; //values returned from plugin to VP go here 1.42 + 1.43 + //=========== MEASUREMENT STUFF ========== 1.44 + #ifdef MEAS__TIME_STAMP_SUSP 1.45 + unsigned int preSuspTSCLow; 1.46 + unsigned int postSuspTSCLow; 1.47 + #endif 1.48 + #ifdef MEAS__TIME_MASTER /* in VirtProcr because multiple masterVPs*/ 1.49 + unsigned int startMasterTSCLow;USE_GNU 1.50 + unsigned int endMasterTSCLow; 1.51 + #endif 1.52 + //======================================== 1.53 + 1.54 + float64 createPtInSecs; //have space but don't use on some configs 1.55 + }; 1.56 +//VirtProcr 1.57 + 1.58 void saveCoreLoopReturnAddr(void **returnAddress); 1.59 1.60 void switchToVP(VirtProcr *nextProcr); 1.61 @@ -20,10 +65,12 @@ 1.62 1.63 void startVirtProcrFn(); 1.64 1.65 -void *asmTerminateCoreLoop(VirtProcr *currPr); 1.66 +void asmTerminateCoreLoop(VirtProcr *currPr); 1.67 + 1.68 +void asmTerminateCoreLoopSeq(VirtProcr *currPr); 1.69 1.70 #define flushRegisters() \ 1.71 - asm volatile ("":::"%rbx", "%r12", "%r13","%r14","%r15") 1.72 + asm volatile ("":::"%rbx", "%r12", "%r13","%r14","%r15"); 1.73 1.74 inline VirtProcr * 1.75 create_procr_helper( VirtProcr *newPr, VirtProcrFnPtr fnPtr,
