Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
view ProcrContext.h @ 135:0b49fd35afc1
distributed free working
-app sends a VMSSemReqst to his Master which send a request to a different Master
-Master send the request directly
-The request structure is freed by the sender, when the request was handled
There are still problems on shutdown. The shutdownVPs are all allocated by one Master which is likly to be terminated
| author | Merten Sach <msach@mailbox.tu-berlin.de> |
|---|---|
| date | Fri, 16 Sep 2011 20:08:28 +0200 |
| parents | dbfc8382d546 |
| children | 99343ffe1918 |
line source
1 /*
2 * Copyright 2009 OpenSourceStewardshipFoundation.org
3 * Licensed under GNU General Public License version 2
4 *
5 * Author: seanhalle@yahoo.com
6 *
7 */
8 #ifndef _ProcrContext_H
9 #define _ProcrContext_H
10 #define _GNU_SOURCE
12 typedef struct _VirtProcr VirtProcr;
13 typedef struct _VMSReqst VMSReqst;
14 typedef void (*VirtProcrFnPtr) ( void *, VirtProcr * ); //initData, animPr
17 #include "VMS_primitive_data_types.h"
18 #include "scheduling.h"
20 /*WARNING: re-arranging this data structure could cause VP switching
21 * assembly code to fail -- hard-codes offsets of fields
22 */
23 struct _VirtProcr
24 { int procrID; //for debugging -- count up each time create
25 int coreAnimatedBy;
26 void *startOfStack;
27 void *stackPtr;
28 void *framePtr;
29 void *nextInstrPt;
31 void *coreLoopStartPt; //allows proto-runtime to be linked later
32 void *coreLoopFramePtr; //restore before jmp back to core loop
33 void *coreLoopStackPtr; //restore before jmp back to core loop
35 void *initialData;
37 SchedSlot *schedSlot;
38 VMSReqst *requests;
40 void *semanticData;
41 void *dataRetFromReq; //values returned from plugin to VP go here
43 //=========== MEASUREMENT STUFF ==========
44 #ifdef MEAS__TIME_STAMP_SUSP
45 unsigned int preSuspTSCLow;
46 unsigned int postSuspTSCLow;
47 #endif
48 #ifdef MEAS__TIME_MASTER /* in VirtProcr because multiple masterVPs*/
49 unsigned int startMasterTSCLow;USE_GNU
50 unsigned int endMasterTSCLow;
51 #endif
52 //========================================
54 float64 createPtInSecs; //have space but don't use on some configs
55 };
56 //VirtProcr
58 void saveCoreLoopReturnAddr(void **returnAddress);
60 void switchToVP(VirtProcr *nextProcr);
62 void switchToCoreLoop(VirtProcr *nextProcr);
64 void masterSwitchToCoreLoop(VirtProcr *nextProcr);
66 void startVirtProcrFn();
68 void *asmTerminateCoreLoop(VirtProcr *currPr);
70 #define flushRegisters() \
71 asm volatile ("":::"%rbx", "%r12", "%r13","%r14","%r15");
73 inline VirtProcr *
74 create_procr_helper( VirtProcr *newPr, VirtProcrFnPtr fnPtr,
75 void *initialData, void *stackLocs );
77 #endif /* _ProcrContext_H */
