diff VMS.h @ 53:42dd44df1bb0

Init changed to only use VMS__malloc & uses VMS__malloc versions of utilities
author Me
date Mon, 01 Nov 2010 21:21:32 -0700
parents f59cfa31a579
children f8508572f3de
line diff
     1.1 --- a/VMS.h	Sat Oct 30 21:53:55 2010 -0700
     1.2 +++ b/VMS.h	Mon Nov 01 21:21:32 2010 -0700
     1.3 @@ -65,7 +65,7 @@
     1.4  
     1.5  #define MIN_WORK_UNIT_CYCLES 20000
     1.6  
     1.7 -#define READYTOANIMATE_RETRIES 10000
     1.8 +#define MASTERLOCK_RETRIES 10000
     1.9  
    1.10     // stack
    1.11  #define VIRT_PROCR_STACK_SIZE 0x4000
    1.12 @@ -163,7 +163,7 @@
    1.13     VMSReqst   *requests;
    1.14  
    1.15     void       *semanticData; //this lives here for the life of VP
    1.16 -   void       *dataReturnedFromReq;//values returned from plugin to VP go here
    1.17 +   void       *dataRetFromReq;//values returned from plugin to VP go here
    1.18  
    1.19        //=========== MEASUREMENT STUFF ==========
    1.20     #ifdef MEAS__TIME_STAMP_SUSP
    1.21 @@ -205,7 +205,7 @@
    1.22  
    1.23        //=========== MEASUREMENT STUFF =============
    1.24     IntervalProbe  **intervalProbes;
    1.25 -   DynArrayInfo    *dynIntervalProbesInfo;
    1.26 +   PrivDynArrayInfo    *dynIntervalProbesInfo;
    1.27     HashTable       *probeNameHashTbl;
    1.28     int32            masterCreateProbeID;
    1.29     float64          createPtInSecs;
    1.30 @@ -245,7 +245,8 @@
    1.31  
    1.32  //===========================  Function Prototypes  =========================
    1.33  
    1.34 -//============== Setup and shutdown =============
    1.35 +
    1.36 +//========== Setup and shutdown ==========
    1.37  void
    1.38  VMS__init();
    1.39  
    1.40 @@ -261,16 +262,22 @@
    1.41  VirtProcr *
    1.42  VMS__create_procr( VirtProcrFnPtr fnPtr, void *initialData );
    1.43  
    1.44 +void
    1.45 +VMS__dissipate_procr( VirtProcr *procrToDissipate );
    1.46 +
    1.47     //Use this to create processor inside entry point & other places outside
    1.48     // the VMS system boundary (IE, not run in slave nor Master)
    1.49  VirtProcr *
    1.50  VMS_ext__create_procr( VirtProcrFnPtr fnPtr, void *initialData );
    1.51  
    1.52 -VirtProcr *
    1.53 -VMS__create_the_shutdown_procr();
    1.54 +void
    1.55 +VMS_ext__dissipate_procr( VirtProcr *procrToDissipate );
    1.56  
    1.57  void
    1.58 -VMS__cleanup_after_shutdown();
    1.59 +VMS__shutdown();
    1.60 +
    1.61 +void
    1.62 +VMS__cleanup_at_end_of_shutdown();
    1.63  
    1.64  
    1.65  //==============  Request Related  ===============
    1.66 @@ -279,49 +286,31 @@
    1.67  VMS__suspend_procr( VirtProcr *callingPr );
    1.68  
    1.69  inline void
    1.70 -VMS__add_sem_request( void *semReqData, VirtProcr *callingPr );
    1.71 +VMS__add_sem_request_in_mallocd_VMSReqst( void *semReqData, VirtProcr *callingPr );
    1.72 +
    1.73 +inline void
    1.74 +VMS__send_sem_request( void *semReqData, VirtProcr *callingPr );
    1.75  
    1.76  void
    1.77  VMS__send_create_procr_req( void *semReqData, VirtProcr *reqstingPr );
    1.78  
    1.79 +void inline
    1.80 +VMS__send_dissipate_req( VirtProcr *prToDissipate );
    1.81 +
    1.82  inline void
    1.83  VMS__send_VMSSem_request( void *semReqData, VirtProcr *callingPr );
    1.84  
    1.85 -void
    1.86 -VMS__free_request( VMSReqst *req );
    1.87 -
    1.88 -void
    1.89 -VMS__remove_and_free_top_request( VirtProcr *reqstingPr );
    1.90 -
    1.91  VMSReqst *
    1.92  VMS__take_next_request_out_of( VirtProcr *procrWithReq );
    1.93  
    1.94  inline void *
    1.95  VMS__take_sem_reqst_from( VMSReqst *req );
    1.96 -//
    1.97 -//VMSReqst *
    1.98 -//VMS__take_top_request_from( VirtProcr *reqstingPr );
    1.99 -//
   1.100 -//inline int
   1.101 -//VMS__isSemanticReqst( VMSReqst *req );
   1.102 -//
   1.103 -//inline int
   1.104 -//VMS__isDissipateReqst( VMSReqst *req );
   1.105 -//
   1.106 -//inline int
   1.107 -//VMS__isCreateReqst( VMSReqst *req );
   1.108  
   1.109 -//==========================
   1.110  
   1.111 -void inline
   1.112 -VMS__dissipate_procr( VirtProcr *prToDissipate );
   1.113  
   1.114 -void
   1.115 -VMS__handle_dissipate_reqst( VirtProcr *procrToDissipate );
   1.116 +//======================== STATS ======================
   1.117  
   1.118 -
   1.119 -
   1.120 -//===================== RDTSC wrapper ==================
   1.121 +//===== RDTSC wrapper =====
   1.122  
   1.123  #define saveTimeStampCountInto(low, high) \
   1.124     asm volatile("RDTSC;                   \
   1.125 @@ -339,8 +328,7 @@
   1.126     /* inputs  */ :                        \
   1.127     /* clobber */ : "%eax", "%edx"         \
   1.128                  );
   1.129 -
   1.130 -//======================== STATS ======================
   1.131 +//=====
   1.132  
   1.133  #include "probes.h"
   1.134