Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff ProcrContext.h @ 132:dbfc8382d546
distributed memory allocation interface - unfinished
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Fri, 16 Sep 2011 14:25:49 +0200 |
| parents | 521c75d64cef |
| children | a9b72021f053 |
line diff
1.1 --- a/ProcrContext.h Wed Sep 07 17:45:05 2011 +0200 1.2 +++ b/ProcrContext.h Fri Sep 16 14:25:49 2011 +0200 1.3 @@ -5,11 +5,60 @@ 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 +#include "VMS.h" 1.13 + 1.14 +typedef struct _SchedSlot SchedSlot; 1.15 +typedef struct _VirtProcr VirtProcr; 1.16 + 1.17 +/*WARNING: re-arranging this data structure could cause VP switching 1.18 + * assembly code to fail -- hard-codes offsets of fields 1.19 + */ 1.20 +struct _VirtProcr 1.21 + { int procrID; //for debugging -- count up each time create 1.22 + int coreAnimatedBy; 1.23 + void *startOfStack; 1.24 + void *stackPtr; 1.25 + void *framePtr; 1.26 + void *nextInstrPt; 1.27 + 1.28 + void *coreLoopStartPt; //allows proto-runtime to be linked later 1.29 + void *coreLoopFramePtr; //restore before jmp back to core loop 1.30 + void *coreLoopStackPtr; //restore before jmp back to core loop 1.31 + 1.32 + void *initialData; 1.33 + 1.34 + SchedSlot *schedSlot; 1.35 + VMSReqst *requests; 1.36 + 1.37 + void *semanticData; 1.38 + void *dataRetFromReq; //values returned from plugin to VP go here 1.39 + 1.40 + //=========== MEASUREMENT STUFF ========== 1.41 + #ifdef MEAS__TIME_STAMP_SUSP 1.42 + unsigned int preSuspTSCLow; 1.43 + unsigned int postSuspTSCLow; 1.44 + #endif 1.45 + #ifdef MEAS__TIME_MASTER /* in VirtProcr because multiple masterVPs*/ 1.46 + unsigned int startMasterTSCLow;USE_GNU 1.47 + unsigned int endMasterTSCLow; 1.48 + #endif 1.49 + //======================================== 1.50 + 1.51 + float64 createPtInSecs; //have space but don't use on some configs 1.52 + }; 1.53 +//VirtProcr 1.54 + 1.55 +struct _SchedSlot 1.56 + { 1.57 + int workIsDone; 1.58 + int needsProcrAssigned; 1.59 + VirtProcr *procrAssignedToSlot; 1.60 + }; 1.61 + 1.62 void saveCoreLoopReturnAddr(void **returnAddress); 1.63 1.64 void switchToVP(VirtProcr *nextProcr);
