# HG changeset patch # User Sean Halle # Date 1379202989 25200 # Node ID e6b7ac0e6d73efb0f3a0c45e21f1941a83de736c # Parent d460a47ed2d6b02df6741933a7ebdbf65244ea06 Some small changes to PR__int PR__PI and PR__structs__common.. not sure what for diff -r d460a47ed2d6 -r e6b7ac0e6d73 PR__PI.h --- a/PR__PI.h Thu Aug 08 02:39:56 2013 -0700 +++ b/PR__PI.h Sat Sep 14 16:56:29 2013 -0700 @@ -46,8 +46,9 @@ #define \ PR_SS__give_lang_data_from_slave PR_int__give_lang_data_from_slave -int32 -PR_PI__give_num_cores(); +#define \ +PR_PI__give_num_cores PR_SS__give_num_cores + //============ //=== Lang Env @@ -130,6 +131,9 @@ void PR_SS__create_the_coreCtlr_OS_threads(); +int +PR_SS__give_num_cores(); + //=================== void * PR_SS__create_lang_env( int32 size, SlaveVP *slave, int32 magicNum ); diff -r d460a47ed2d6 -r e6b7ac0e6d73 PR__int.h --- a/PR__int.h Thu Aug 08 02:39:56 2013 -0700 +++ b/PR__int.h Sat Sep 14 16:56:29 2013 -0700 @@ -197,6 +197,12 @@ PR_int__insert_elem_into_collection( PRCollElem *elem, PRCollElem **coll, int32 hash ); inline +void +PR_int__replace_or_insert_elem_into_collection( PRCollElem *elem, + PRCollElem **coll, + int32 hash ); + +inline void * PR_int__lookup_elem_in_collection( int32 hash, PRCollElem **coll ); @@ -221,6 +227,20 @@ void PR_int__throw_exception( char *msgStr, SlaveVP *reqstSlv, PRExcp *excpData ); +/*Some macro magic -- the __FILE__ turns into a string, and the + * preprocessor merges the quotes. But the __LINE__ turns into an int, + * so have to use the # operator to turn it into a string.. but the + * # operator doesn't expand what comes after, so have to do an extra + * level so that pre-processor first expands __LINE__ into number then + * hands to the # operator, which turns into string (then it merges + * quotes) + */ +#define PR__throw_simple_exception( throwingVP ) \ + do{ PR_int__throw_exception( __FILE__ ", " STR(__LINE__), throwingVP, NULL ); \ + } while(0) + +#define STR( s ) #s + char * PR_int__strDup( char *str ); diff -r d460a47ed2d6 -r e6b7ac0e6d73 PR__structs__common.h --- a/PR__structs__common.h Thu Aug 08 02:39:56 2013 -0700 +++ b/PR__structs__common.h Sat Sep 14 16:56:29 2013 -0700 @@ -80,7 +80,7 @@ PRLangEnv **langEnvs; //used as a hash table PRLangEnv **protoLangEnvsList; //for fast linear scan of envs - int32 numLangEnvs; //for fast linear scan of envs + int32 numLangEnvs; //for fast linear scan of envs SlaveVP *seedSlv; @@ -89,6 +89,7 @@ SlaveAssigner overrideAssigner; + int32 numConsecutiveTasks; //These are used to coord with an OS thread waiting for process to end @@ -243,6 +244,8 @@ PRLangData **langDatas; //Lang saves lang-specific things in slave here PRMetaTask **metaTasks; + PRGhostInfo *ghostInfo; + //=========== MEASUREMENT STUFF ========== MEAS__Insert_Meas_Fields_into_Slave; float64 createPtInSecs; //time VP created, in seconds