# HG changeset patch # User Nina Engelhardt # Date 1368624106 -7200 # Node ID 67b684afa7366a60c782eccf30c9c2a4b83c30f9 # Parent 6fcf6aa5c0822e0565d6b8821374ec184446ea42 hide animating VP and entry point diff -r 6fcf6aa5c082 -r 67b684afa736 CoreController.c --- a/CoreController.c Wed Mar 27 18:06:37 2013 +0100 +++ b/CoreController.c Wed May 15 15:21:46 2013 +0200 @@ -29,6 +29,7 @@ //=========================================================================== + __thread SlaveVP* currVP; /*The Core Controller is logically "beneath" the masterVP and slave VPs. Its * job is to control which of those VPs the core animates. Any time one of @@ -74,7 +75,6 @@ { int32 thisCoresIdx; int32 numRepetitionsWithNoWork; - SlaveVP *currVP; AnimSlot *currSlot, **animSlots; int32 currSlotIdx; volatile int32 *addrOfMasterLock; //thing pointed to is volatile, not ptr diff -r 6fcf6aa5c082 -r 67b684afa736 HW_Dependent_Primitives/VMS__primitives.c --- a/HW_Dependent_Primitives/VMS__primitives.c Wed Mar 27 18:06:37 2013 +0100 +++ b/HW_Dependent_Primitives/VMS__primitives.c Wed May 15 15:21:46 2013 +0200 @@ -31,7 +31,7 @@ // Stack grows *down*, so start it at highest stack addr, minus room // for 2 params + return addr. Do ptr arith in terms of bytes.. stackPtr = - (uint8 *)slaveVP->startOfStack + VIRT_PROCR_STACK_SIZE - 5*sizeof(void*); + (uint8 *)slaveVP->startOfStack + VIRT_PROCR_STACK_SIZE - 3*sizeof(void*); //setup __cdecl on stack //Normally, return Addr is in loc pointed to by stackPtr, but doing a @@ -50,7 +50,7 @@ //core controller will switch to stack & frame pointers stored in slave, // can't use this fn if have state on stack that needs preserving. slaveVP->stackPtr = stackPtr; - slaveVP->framePtr = stackPtr; + slaveVP->framePtr = 0; } diff -r 6fcf6aa5c082 -r 67b684afa736 VMS.h --- a/VMS.h Wed Mar 27 18:06:37 2013 +0100 +++ b/VMS.h Wed May 15 15:21:46 2013 +0200 @@ -44,8 +44,8 @@ typedef SlaveVP *(*SlaveAssigner) ( void *, AnimSlot*); //semEnv, slot for HW info typedef void (*RequestHandler) ( SlaveVP *, void * ); //prWReqst, semEnv -typedef void (*TopLevelFnPtr) ( void *, SlaveVP * ); //initData, animSlv -typedef void TopLevelFn ( void *, SlaveVP * ); //initData, animSlv +typedef void (*TopLevelFnPtr) ( void * ); //initData, animSlv +typedef void TopLevelFn ( void * ); //initData, animSlv typedef void (*ResumeSlvFnPtr) ( SlaveVP *, void * ); //=========== MEASUREMENT STUFF ========== MEAS__Insert_Counter_Handler @@ -238,6 +238,7 @@ //============================= Global Vars ================================ volatile MasterEnv *_VMSMasterEnv __align_to_cacheline__; +extern __thread SlaveVP* currVP; //these are global, but only used for startup and shutdown pthread_t coreCtlrThdHandles[ NUM_CORES ]; //pthread's virt-procr state