Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
changeset 280:67b684afa736 Common_Ancestor
hide animating VP and entry point
| author | Nina Engelhardt <nengel@mailbox.tu-berlin.de> |
|---|---|
| date | Wed, 15 May 2013 15:21:46 +0200 |
| parents | 6fcf6aa5c082 |
| children | b58fb1343377 |
| files | CoreController.c HW_Dependent_Primitives/VMS__primitives.c VMS.h |
| diffstat | 3 files changed, 6 insertions(+), 5 deletions(-) [+] |
line diff
1.1 --- a/CoreController.c Wed Mar 27 18:06:37 2013 +0100 1.2 +++ b/CoreController.c Wed May 15 15:21:46 2013 +0200 1.3 @@ -29,6 +29,7 @@ 1.4 1.5 //=========================================================================== 1.6 1.7 + __thread SlaveVP* currVP; 1.8 1.9 /*The Core Controller is logically "beneath" the masterVP and slave VPs. Its 1.10 * job is to control which of those VPs the core animates. Any time one of 1.11 @@ -74,7 +75,6 @@ 1.12 { 1.13 int32 thisCoresIdx; 1.14 int32 numRepetitionsWithNoWork; 1.15 - SlaveVP *currVP; 1.16 AnimSlot *currSlot, **animSlots; 1.17 int32 currSlotIdx; 1.18 volatile int32 *addrOfMasterLock; //thing pointed to is volatile, not ptr
2.1 --- a/HW_Dependent_Primitives/VMS__primitives.c Wed Mar 27 18:06:37 2013 +0100 2.2 +++ b/HW_Dependent_Primitives/VMS__primitives.c Wed May 15 15:21:46 2013 +0200 2.3 @@ -31,7 +31,7 @@ 2.4 // Stack grows *down*, so start it at highest stack addr, minus room 2.5 // for 2 params + return addr. Do ptr arith in terms of bytes.. 2.6 stackPtr = 2.7 - (uint8 *)slaveVP->startOfStack + VIRT_PROCR_STACK_SIZE - 5*sizeof(void*); 2.8 + (uint8 *)slaveVP->startOfStack + VIRT_PROCR_STACK_SIZE - 3*sizeof(void*); 2.9 2.10 //setup __cdecl on stack 2.11 //Normally, return Addr is in loc pointed to by stackPtr, but doing a 2.12 @@ -50,7 +50,7 @@ 2.13 //core controller will switch to stack & frame pointers stored in slave, 2.14 // can't use this fn if have state on stack that needs preserving. 2.15 slaveVP->stackPtr = stackPtr; 2.16 - slaveVP->framePtr = stackPtr; 2.17 + slaveVP->framePtr = 0; 2.18 } 2.19 2.20
3.1 --- a/VMS.h Wed Mar 27 18:06:37 2013 +0100 3.2 +++ b/VMS.h Wed May 15 15:21:46 2013 +0200 3.3 @@ -44,8 +44,8 @@ 3.4 3.5 typedef SlaveVP *(*SlaveAssigner) ( void *, AnimSlot*); //semEnv, slot for HW info 3.6 typedef void (*RequestHandler) ( SlaveVP *, void * ); //prWReqst, semEnv 3.7 -typedef void (*TopLevelFnPtr) ( void *, SlaveVP * ); //initData, animSlv 3.8 -typedef void TopLevelFn ( void *, SlaveVP * ); //initData, animSlv 3.9 +typedef void (*TopLevelFnPtr) ( void * ); //initData, animSlv 3.10 +typedef void TopLevelFn ( void * ); //initData, animSlv 3.11 typedef void (*ResumeSlvFnPtr) ( SlaveVP *, void * ); 3.12 //=========== MEASUREMENT STUFF ========== 3.13 MEAS__Insert_Counter_Handler 3.14 @@ -238,6 +238,7 @@ 3.15 //============================= Global Vars ================================ 3.16 3.17 volatile MasterEnv *_VMSMasterEnv __align_to_cacheline__; 3.18 +extern __thread SlaveVP* currVP; 3.19 3.20 //these are global, but only used for startup and shutdown 3.21 pthread_t coreCtlrThdHandles[ NUM_CORES ]; //pthread's virt-procr state
