diff VMS.h @ 223:b0b93147adfb

More rearrangement -- have "Services_Offered_by_VMS" directory now, w/Debug etc
author Some Random Person <seanhalle@yahoo.com>
date Tue, 13 Mar 2012 18:28:04 -0700
parents c88ce1db91ef
children 309559064073
line diff
     1.1 --- a/VMS.h	Tue Mar 13 10:02:06 2012 -0700
     1.2 +++ b/VMS.h	Tue Mar 13 18:28:04 2012 -0700
     1.3 @@ -15,7 +15,7 @@
     1.4  #include "Hash_impl/PrivateHash.h"
     1.5  #include "Histogram/Histogram.h"
     1.6  #include "Queue_impl/PrivateQueue.h"
     1.7 -#include "vmalloc.h"
     1.8 +#include "Services_Offered_by_VMS/Memory_Handling/vmalloc.h"
     1.9  
    1.10  #include <pthread.h>
    1.11  #include <sys/time.h>
    1.12 @@ -24,7 +24,7 @@
    1.13  //
    1.14  // Note: ALL defines are in other files, none are in here
    1.15  //
    1.16 -#include "Defines/VMS_defs__main.h"
    1.17 +#include "Defines/VMS_defs.h"
    1.18  
    1.19  
    1.20  //================================ Typedefs =================================
    1.21 @@ -44,11 +44,11 @@
    1.22  typedef struct _GateStruc     GateStruc;
    1.23  
    1.24  
    1.25 -typedef SlaveVP * (*Sched_Assigner) ( void *, int       ); //semEnv, coreIdx
    1.26 -typedef void      (*RequestHandler) ( SlaveVP *, void * ); //prWReqst, semEnv
    1.27 -typedef void      (*TopLevelFnPtr)  ( void *, SlaveVP * ); //initData, animSlv
    1.28 -typedef void        TopLevelFn      ( void *, SlaveVP * ); //initData, animSlv
    1.29 -typedef void      (*ResumeSlvFnPtr) ( SlaveVP *, void * );
    1.30 +typedef SlaveVP *(*SlaveAssigner)  ( void *, int, SchedSlot *); //semEnv, coreIdx, slot for HW info
    1.31 +typedef void     (*RequestHandler) ( SlaveVP *, void * ); //prWReqst, semEnv
    1.32 +typedef void     (*TopLevelFnPtr)  ( void *, SlaveVP * ); //initData, animSlv
    1.33 +typedef void       TopLevelFn      ( void *, SlaveVP * ); //initData, animSlv
    1.34 +typedef void     (*ResumeSlvFnPtr) ( SlaveVP *, void * );
    1.35  
    1.36  //============================ HW Dependent Fns ================================
    1.37  
    1.38 @@ -98,9 +98,10 @@
    1.39  
    1.40  struct _SchedSlot
    1.41   {
    1.42 +   int         slotIdx;     //needed by Holistic Model's data gathering
    1.43     int         workIsDone;
    1.44     int         needsSlaveAssigned;
    1.45 -   SlaveVP  *slaveAssignedToSlot;
    1.46 +   SlaveVP    *slaveAssignedToSlot;
    1.47   };
    1.48  //SchedSlot
    1.49  
    1.50 @@ -140,7 +141,7 @@
    1.51   */
    1.52  typedef struct
    1.53   {
    1.54 -   Sched_Assigner   slaveAssigner;
    1.55 +   SlaveAssigner   slaveAssigner;
    1.56     RequestHandler   requestHandler;
    1.57     
    1.58     SchedSlot     ***allSchedSlots;
    1.59 @@ -149,13 +150,12 @@
    1.60  
    1.61     void            *semanticEnv;
    1.62     void            *OSEventStruc;   //for future, when add I/O to BLIS
    1.63 -   MallocArrays   *freeLists;
    1.64 +   MallocArrays    *freeLists;
    1.65     int32            amtOfOutstandingMem; //total currently allocated
    1.66  
    1.67     void            *coreCtlrReturnPt;//addr to jump to to re-enter coreCtlr
    1.68  
    1.69     int32            setupComplete;
    1.70 -   int32            numMasterInARow[NUM_CORES];//detect back-to-back masterVP
    1.71     int32            masterLock __align_to_cacheline__;
    1.72     GateStruc       *workStealingGates[ NUM_CORES ]; //concurrent work-steal
    1.73     int32            workStealingLock;
    1.74 @@ -235,39 +235,6 @@
    1.75  void
    1.76  VMS_SS__init();
    1.77  
    1.78 -//Fix; 
    1.79 -/*seed-slaveVP creation -- put box around language, have lang register stuff
    1.80 -        with VMS.
    1.81 -        have main program explicitly INIT Lang! -- makes more sense to
    1.82 -        C programmers -- makes it clear that there's a transition.
    1.83 -(might need to have the pthreads remain waiting for
    1.84 -        cond until work is scheduled)
    1.85 -Have main do call to tell language to perform work -- like did with DKU
    1.86 -
    1.87 -Ex: "HWSim__run_a_simulation(netlist, paramBag);"
    1.88 -        "processID = SSR__run_program(seed_fn, seedData); "
    1.89 -        "SSR__Wait_for_program_to_end(processID);"
    1.90 -        "SSR__run_program_and_wait_till_it_ends(seed_fn, seedData);"
    1.91 -        
    1.92 -        allows multiple languages to be started, and programs run in several,
    1.93 -        overlapped, or one program to be run that uses multiple langs..?
    1.94 -        So, each program is in separate directory:
    1.95 -            "HWSim_ArchDef__PingPong"  "SSR_Program__Blocked_Matrix_Mult"
    1.96 -        
    1.97 -        Those programs can talk to each other, via VMS, by handles they each
    1.98 -        return
    1.99 -        "processIDs[0] = SSR__run_program(seed_fn1, seedData1);"
   1.100 -        "processIDs[1] = SSR__run_program(seed_fn2, seedData2);"
   1.101 -        "SSR__link_programs(processIDs, 2);"
   1.102 -or even
   1.103 -        "processIDs[0] = Vthread__run_program(seed_fn1, seedData1);"
   1.104 -        "processIDs[1] = SSR__run_program(seed_fn2, seedData2);"
   1.105 -        "VMS__link_programs(processIDs, 2);"
   1.106 -        Then, the programs just know they sync with other prog, but use own
   1.107 -        lang's sync constructs -- VMS uses message system to establish tie-pt,
   1.108 -        each lang defines what a tie-point means to it..  (work with the
   1.109 -        diff semantics?)
   1.110 -*/
   1.111  void
   1.112  VMS_SS__start_the_work_then_wait_until_done();
   1.113  
   1.114 @@ -360,7 +327,7 @@
   1.115  
   1.116  
   1.117  //========================= Probes =======================
   1.118 -#include "Probes/probes.h"
   1.119 +#include "Services_Offered_by_VMS/Measurement_and_Stats/probes.h"
   1.120  
   1.121  //================================================
   1.122  #endif	/* _VMS_H */