Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison ProcrContext.h @ 134:a9b72021f053
Distributed memory management w/o free requests working
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Fri, 16 Sep 2011 16:19:24 +0200 |
| parents | dbfc8382d546 |
| children | 99343ffe1918 |
comparison
equal
deleted
inserted
replaced
| 2:dccbc2cc1c3e | 3:900bb862f58e |
|---|---|
| 7 */ | 7 */ |
| 8 #ifndef _ProcrContext_H | 8 #ifndef _ProcrContext_H |
| 9 #define _ProcrContext_H | 9 #define _ProcrContext_H |
| 10 #define _GNU_SOURCE | 10 #define _GNU_SOURCE |
| 11 | 11 |
| 12 #include "VMS.h" | 12 typedef struct _VirtProcr VirtProcr; |
| 13 typedef struct _VMSReqst VMSReqst; | |
| 14 typedef void (*VirtProcrFnPtr) ( void *, VirtProcr * ); //initData, animPr | |
| 13 | 15 |
| 14 typedef struct _SchedSlot SchedSlot; | 16 |
| 15 typedef struct _VirtProcr VirtProcr; | 17 #include "VMS_primitive_data_types.h" |
| 18 #include "scheduling.h" | |
| 16 | 19 |
| 17 /*WARNING: re-arranging this data structure could cause VP switching | 20 /*WARNING: re-arranging this data structure could cause VP switching |
| 18 * assembly code to fail -- hard-codes offsets of fields | 21 * assembly code to fail -- hard-codes offsets of fields |
| 19 */ | 22 */ |
| 20 struct _VirtProcr | 23 struct _VirtProcr |
| 50 | 53 |
| 51 float64 createPtInSecs; //have space but don't use on some configs | 54 float64 createPtInSecs; //have space but don't use on some configs |
| 52 }; | 55 }; |
| 53 //VirtProcr | 56 //VirtProcr |
| 54 | 57 |
| 55 struct _SchedSlot | |
| 56 { | |
| 57 int workIsDone; | |
| 58 int needsProcrAssigned; | |
| 59 VirtProcr *procrAssignedToSlot; | |
| 60 }; | |
| 61 | |
| 62 void saveCoreLoopReturnAddr(void **returnAddress); | 58 void saveCoreLoopReturnAddr(void **returnAddress); |
| 63 | 59 |
| 64 void switchToVP(VirtProcr *nextProcr); | 60 void switchToVP(VirtProcr *nextProcr); |
| 65 | 61 |
| 66 void switchToCoreLoop(VirtProcr *nextProcr); | 62 void switchToCoreLoop(VirtProcr *nextProcr); |
| 70 void startVirtProcrFn(); | 66 void startVirtProcrFn(); |
| 71 | 67 |
| 72 void *asmTerminateCoreLoop(VirtProcr *currPr); | 68 void *asmTerminateCoreLoop(VirtProcr *currPr); |
| 73 | 69 |
| 74 #define flushRegisters() \ | 70 #define flushRegisters() \ |
| 75 asm volatile ("":::"%rbx", "%r12", "%r13","%r14","%r15") | 71 asm volatile ("":::"%rbx", "%r12", "%r13","%r14","%r15"); |
| 76 | 72 |
| 77 inline VirtProcr * | 73 inline VirtProcr * |
| 78 create_procr_helper( VirtProcr *newPr, VirtProcrFnPtr fnPtr, | 74 create_procr_helper( VirtProcr *newPr, VirtProcrFnPtr fnPtr, |
| 79 void *initialData, void *stackLocs ); | 75 void *initialData, void *stackLocs ); |
| 80 | 76 |
