Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
diff VMS.h @ 245:f1267bc7b342
added exceptions, make malloc in WL and App get master lock, added rand num
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Wed, 30 May 2012 14:23:47 -0700 |
| parents | 227cd4d33d94 |
| children | 4c7414df4f0e |
line diff
1.1 --- a/VMS.h Fri May 25 12:23:03 2012 +0200 1.2 +++ b/VMS.h Wed May 30 14:23:47 2012 -0700 1.3 @@ -76,15 +76,18 @@ 1.4 1.5 enum VMSSemReqstType //These are equivalent to semantic requests, but for 1.6 { // VMS's services available directly to app, like OS 1.7 - createProbe = 1, // and probe services -- like a VMS-wide built-in lang 1.8 + make_probe = 1, // and probe services -- like a VMS-wide built-in lang 1.9 + throw_excp, 1.10 openFile, 1.11 otherIO 1.12 }; 1.13 1.14 typedef struct 1.15 { enum VMSSemReqstType reqType; 1.16 - SlaveVP *requestingSlv; 1.17 + SlaveVP *requestingSlv; 1.18 char *nameStr; //for create probe 1.19 + char *msgStr; //for exception 1.20 + void *exceptionData; 1.21 } 1.22 VMSSemReq; 1.23 1.24 @@ -182,7 +185,11 @@ 1.25 //Memory management related 1.26 MallocArrays *freeLists; 1.27 int32 amtOfOutstandingMem;//total currently allocated 1.28 - 1.29 + 1.30 + //Random number seeds -- random nums used in various places 1.31 + uint32_t seed1; 1.32 + uint32_t seed2; 1.33 + 1.34 //=========== MEASUREMENT STUFF ============= 1.35 IntervalProbe **intervalProbes; 1.36 PrivDynArrayInfo *dynIntervalProbesInfo; 1.37 @@ -311,8 +318,10 @@ 1.38 1.39 void 1.40 VMS_int__throw_exception( char *msgStr, SlaveVP *reqstSlv, VMSExcp *excpData ); 1.41 -#define VMS_PI__throw_exception VMS_int__throw_exception 1.42 -#define VMS_WL__throw_exception VMS_int__throw_exception 1.43 +#define VMS_PI__throw_exception VMS_int__throw_exception 1.44 +void 1.45 +VMS_WL__throw_exception( char *msgStr, SlaveVP *reqstSlv, VMSExcp *excpData ); 1.46 +#define VMS_App__throw_exception VMS_WL__throw_exception 1.47 1.48 void * 1.49 VMS_int__give_sem_env_for( SlaveVP *animSlv ); 1.50 @@ -320,6 +329,15 @@ 1.51 #define VMS_SS__give_sem_env_for VMS_int__give_sem_env_for 1.52 //No WL version -- not safe! if use in WL, be sure data rd & wr is stable 1.53 1.54 + 1.55 +inline void 1.56 +VMS_int__get_master_lock(); 1.57 + 1.58 +#define VMS_int__release_master_lock() _VMSMasterEnv->masterLock = UNLOCKED 1.59 + 1.60 +inline uint32_t 1.61 +VMS_int__randomNumber(); 1.62 + 1.63 //============== Request Related =============== 1.64 1.65 void
