changeset 2:e6b7ac0e6d73 Dev_Univ

Some small changes to PR__int PR__PI and PR__structs__common.. not sure what for
author Sean Halle <seanhalle@yahoo.com>
date Sat, 14 Sep 2013 16:56:29 -0700
parents d460a47ed2d6
children c3829f630c2f
files PR__PI.h PR__int.h PR__structs__common.h
diffstat 3 files changed, 30 insertions(+), 3 deletions(-) [+]
line diff
     1.1 --- a/PR__PI.h	Thu Aug 08 02:39:56 2013 -0700
     1.2 +++ b/PR__PI.h	Sat Sep 14 16:56:29 2013 -0700
     1.3 @@ -46,8 +46,9 @@
     1.4  #define \
     1.5  PR_SS__give_lang_data_from_slave   PR_int__give_lang_data_from_slave
     1.6  
     1.7 -int32
     1.8 -PR_PI__give_num_cores();
     1.9 +#define \
    1.10 +PR_PI__give_num_cores  PR_SS__give_num_cores
    1.11 +
    1.12  
    1.13  //============
    1.14  //=== Lang Env
    1.15 @@ -130,6 +131,9 @@
    1.16  void
    1.17  PR_SS__create_the_coreCtlr_OS_threads();
    1.18  
    1.19 +int
    1.20 +PR_SS__give_num_cores();
    1.21 +
    1.22  //===================
    1.23  void *
    1.24  PR_SS__create_lang_env( int32 size, SlaveVP *slave, int32 magicNum );
     2.1 --- a/PR__int.h	Thu Aug 08 02:39:56 2013 -0700
     2.2 +++ b/PR__int.h	Sat Sep 14 16:56:29 2013 -0700
     2.3 @@ -197,6 +197,12 @@
     2.4  PR_int__insert_elem_into_collection( PRCollElem *elem, PRCollElem **coll, int32 hash );
     2.5  
     2.6  inline
     2.7 +void
     2.8 +PR_int__replace_or_insert_elem_into_collection( PRCollElem *elem, 
     2.9 +                                                PRCollElem **coll, 
    2.10 +                                                int32 hash );
    2.11 +
    2.12 +inline
    2.13  void *
    2.14  PR_int__lookup_elem_in_collection( int32 hash, PRCollElem **coll );
    2.15  
    2.16 @@ -221,6 +227,20 @@
    2.17  void
    2.18  PR_int__throw_exception( char *msgStr, SlaveVP *reqstSlv, PRExcp *excpData );
    2.19  
    2.20 +/*Some macro magic -- the __FILE__ turns into a string, and the 
    2.21 + * preprocessor merges the quotes.  But the __LINE__ turns into an int,
    2.22 + * so have to use the # operator to turn it into a string..  but the
    2.23 + * # operator doesn't expand what comes after, so have to do an extra
    2.24 + * level so that pre-processor first expands __LINE__ into number then 
    2.25 + * hands to the # operator, which turns into string (then it merges
    2.26 + * quotes)
    2.27 + */
    2.28 +#define PR__throw_simple_exception( throwingVP ) \
    2.29 +   do{ PR_int__throw_exception( __FILE__ ", " STR(__LINE__), throwingVP, NULL ); \
    2.30 +     } while(0)
    2.31 +
    2.32 +#define STR( s ) #s
    2.33 +
    2.34  char *
    2.35  PR_int__strDup( char *str );
    2.36  
     3.1 --- a/PR__structs__common.h	Thu Aug 08 02:39:56 2013 -0700
     3.2 +++ b/PR__structs__common.h	Sat Sep 14 16:56:29 2013 -0700
     3.3 @@ -80,7 +80,7 @@
     3.4      
     3.5     PRLangEnv **langEnvs;     //used as a hash table
     3.6     PRLangEnv **protoLangEnvsList; //for fast linear scan of envs
     3.7 -   int32      numLangEnvs;   //for fast linear scan of envs
     3.8 +   int32       numLangEnvs;   //for fast linear scan of envs
     3.9      
    3.10     SlaveVP        *seedSlv;
    3.11     
    3.12 @@ -89,6 +89,7 @@
    3.13  
    3.14     SlaveAssigner   overrideAssigner;
    3.15    
    3.16 +   int32           numConsecutiveTasks;
    3.17     
    3.18     
    3.19        //These are used to coord with an OS thread waiting for process to end
    3.20 @@ -243,6 +244,8 @@
    3.21     PRLangData  **langDatas;  //Lang saves lang-specific things in slave here
    3.22     PRMetaTask  **metaTasks;
    3.23  
    3.24 +   PRGhostInfo  *ghostInfo;
    3.25 +   
    3.26          //=========== MEASUREMENT STUFF ==========
    3.27           MEAS__Insert_Meas_Fields_into_Slave;
    3.28           float64     createPtInSecs;  //time VP created, in seconds