# HG changeset patch # User Philipe Louchtch # Date 1402830388 -7200 # Node ID c05370bd62dd9e07fbf984f6bfba9855399a7232 # Parent f3cb11baf7917cf85f524bbb3c8022c71e8ff424 Raw version of significantly reduced amount of sched_getcpu calls; linked lib_prt commit: 5e2ee79f8d4a diff -r f3cb11baf791 -r c05370bd62dd PR__int.h --- a/PR__int.h Fri May 09 11:19:53 2014 +0200 +++ b/PR__int.h Sun Jun 15 13:06:28 2014 +0200 @@ -264,7 +264,27 @@ __inline void PR_int__aquire_masterLock(); -#define PR_int__release_master_lock() _PRTopEnv->masterLock = UNLOCKED +__inline void +PR_int__aquire_coreController_Cntx_Lock(int32 coreNum); + +__inline void +PR_int__aquire_coreController_CreateVP_Lock(int32 coreNum); + +#define PR_int__release_coreController_Cntx_Lock(__coreNum) \ +do { \ + _PRTopEnv->coreController_Cntx_Lock[__coreNum] = UNLOCKED; \ +} while(0) + +#define PR_int__release_coreController_CreateVP_Lock(__coreNum) \ +do { \ + _PRTopEnv->coreController_CreateVP_Lock[__coreNum] = UNLOCKED; \ +} while(0) + +#define PR_int__release_master_lock() \ +do \ +{ \ + _PRTopEnv->masterLock = UNLOCKED; \ +} while(0) #define PR_int__release_wrapper_lock() _PRTopEnv->wrapperLock = UNLOCKED diff -r f3cb11baf791 -r c05370bd62dd PR__structs__common.h --- a/PR__structs__common.h Fri May 09 11:19:53 2014 +0200 +++ b/PR__structs__common.h Sun Jun 15 13:06:28 2014 +0200 @@ -223,7 +223,7 @@ */ struct _SlaveVP { //The offsets of these fields are hard-coded into assembly - void *stackPtr; //save the core's stack ptr when suspend + int32 stackNo; //save the creating coreCntrl's stack id void *framePtr; //save core's frame ptr when suspend void *resumeInstrPtr; //save core's program-counter when suspend void *coreCtlrFramePtr; //restore before jmp back to core controller