Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 1:4b41cfca7da9 | 2:dccbc2cc1c3e |
|---|---|
| 3 * Licensed under GNU General Public License version 2 | 3 * Licensed under GNU General Public License version 2 |
| 4 * | 4 * |
| 5 * Author: seanhalle@yahoo.com | 5 * Author: seanhalle@yahoo.com |
| 6 * | 6 * |
| 7 */ | 7 */ |
| 8 | |
| 9 #ifndef _ProcrContext_H | 8 #ifndef _ProcrContext_H |
| 10 #define _ProcrContext_H | 9 #define _ProcrContext_H |
| 11 #define _GNU_SOURCE | 10 #define _GNU_SOURCE |
| 11 | |
| 12 #include "VMS.h" | |
| 13 | |
| 14 typedef struct _SchedSlot SchedSlot; | |
| 15 typedef struct _VirtProcr VirtProcr; | |
| 16 | |
| 17 /*WARNING: re-arranging this data structure could cause VP switching | |
| 18 * assembly code to fail -- hard-codes offsets of fields | |
| 19 */ | |
| 20 struct _VirtProcr | |
| 21 { int procrID; //for debugging -- count up each time create | |
| 22 int coreAnimatedBy; | |
| 23 void *startOfStack; | |
| 24 void *stackPtr; | |
| 25 void *framePtr; | |
| 26 void *nextInstrPt; | |
| 27 | |
| 28 void *coreLoopStartPt; //allows proto-runtime to be linked later | |
| 29 void *coreLoopFramePtr; //restore before jmp back to core loop | |
| 30 void *coreLoopStackPtr; //restore before jmp back to core loop | |
| 31 | |
| 32 void *initialData; | |
| 33 | |
| 34 SchedSlot *schedSlot; | |
| 35 VMSReqst *requests; | |
| 36 | |
| 37 void *semanticData; | |
| 38 void *dataRetFromReq; //values returned from plugin to VP go here | |
| 39 | |
| 40 //=========== MEASUREMENT STUFF ========== | |
| 41 #ifdef MEAS__TIME_STAMP_SUSP | |
| 42 unsigned int preSuspTSCLow; | |
| 43 unsigned int postSuspTSCLow; | |
| 44 #endif | |
| 45 #ifdef MEAS__TIME_MASTER /* in VirtProcr because multiple masterVPs*/ | |
| 46 unsigned int startMasterTSCLow;USE_GNU | |
| 47 unsigned int endMasterTSCLow; | |
| 48 #endif | |
| 49 //======================================== | |
| 50 | |
| 51 float64 createPtInSecs; //have space but don't use on some configs | |
| 52 }; | |
| 53 //VirtProcr | |
| 54 | |
| 55 struct _SchedSlot | |
| 56 { | |
| 57 int workIsDone; | |
| 58 int needsProcrAssigned; | |
| 59 VirtProcr *procrAssignedToSlot; | |
| 60 }; | |
| 12 | 61 |
| 13 void saveCoreLoopReturnAddr(void **returnAddress); | 62 void saveCoreLoopReturnAddr(void **returnAddress); |
| 14 | 63 |
| 15 void switchToVP(VirtProcr *nextProcr); | 64 void switchToVP(VirtProcr *nextProcr); |
| 16 | 65 |
