diff VMS.h @ 132:dbfc8382d546

distributed memory allocation interface - unfinished
author Merten Sach <msach@mailbox.tu-berlin.de>
date Fri, 16 Sep 2011 14:25:49 +0200
parents 24466227d8bb
children a9b72021f053
line diff
     1.1 --- a/VMS.h	Wed Sep 07 17:45:05 2011 +0200
     1.2 +++ b/VMS.h	Fri Sep 16 14:25:49 2011 +0200
     1.3 @@ -5,7 +5,6 @@
     1.4   * Author: seanhalle@yahoo.com
     1.5   * 
     1.6   */
     1.7 -
     1.8  #ifndef _VMS_H
     1.9  #define	_VMS_H
    1.10  #define _GNU_SOURCE
    1.11 @@ -111,9 +110,7 @@
    1.12  //===========================================================================
    1.13  typedef unsigned long long TSCount;
    1.14  
    1.15 -typedef struct _SchedSlot     SchedSlot;
    1.16  typedef struct _VMSReqst      VMSReqst;
    1.17 -typedef struct _VirtProcr     VirtProcr;
    1.18  typedef struct _InterMasterReqst InterMasterReqst;
    1.19  typedef struct _IntervalProbe IntervalProbe;
    1.20  typedef struct _GateStruc     GateStruc;
    1.21 @@ -215,53 +212,6 @@
    1.22  
    1.23  //====================  Core data structures  ===================
    1.24  
    1.25 -struct _SchedSlot
    1.26 - {
    1.27 -   int         workIsDone;
    1.28 -   int         needsProcrAssigned;
    1.29 -   VirtProcr  *procrAssignedToSlot;
    1.30 - };
    1.31 -//SchedSlot
    1.32 -
    1.33 -/*WARNING: re-arranging this data structure could cause VP switching
    1.34 - *         assembly code to fail -- hard-codes offsets of fields
    1.35 - */
    1.36 -struct _VirtProcr
    1.37 - { int         procrID;  //for debugging -- count up each time create
    1.38 -   int         coreAnimatedBy;
    1.39 -   void       *startOfStack;
    1.40 -   void       *stackPtr;
    1.41 -   void       *framePtr;
    1.42 -   void       *nextInstrPt;
    1.43 -   
    1.44 -   void       *coreLoopStartPt;  //allows proto-runtime to be linked later
    1.45 -   void       *coreLoopFramePtr; //restore before jmp back to core loop
    1.46 -   void       *coreLoopStackPtr; //restore before jmp back to core loop
    1.47 -
    1.48 -   void       *initialData;
    1.49 -
    1.50 -   SchedSlot  *schedSlot;
    1.51 -   VMSReqst   *requests;
    1.52 -
    1.53 -   void       *semanticData; //this livesUSE_GNU here for the life of VP
    1.54 -   void       *dataRetFromReq;//values returned from plugin to VP go here
    1.55 -
    1.56 -      //=========== MEASUREMENT STUFF ==========
    1.57 -   #ifdef MEAS__TIME_STAMP_SUSP
    1.58 -   unsigned int preSuspTSCLow;
    1.59 -   unsigned int postSuspTSCLow;
    1.60 -   #endif
    1.61 -   #ifdef MEAS__TIME_MASTER /* in VirtProcr because multiple masterVPs*/
    1.62 -   unsigned int startMasterTSCLow;USE_GNU
    1.63 -   unsigned int endMasterTSCLow;
    1.64 -   #endif
    1.65 -      //========================================
    1.66 -   
    1.67 -   float64      createPtInSecs;  //have space but don't use on some configs
    1.68 - };
    1.69 -//VirtProcr
    1.70 -
    1.71 -
    1.72  /*Master Env is the only global variable -- has entry points for any other
    1.73   * data needed.  
    1.74   */
    1.75 @@ -276,22 +226,25 @@
    1.76  
    1.77     void            *semanticEnv;
    1.78     void            *OSEventStruc;   //for future, when add I/O to BLIS
    1.79 -   MallocProlog    *freeListHead;
    1.80 -   int32            amtOfOutstandingMem; //total currently allocated
    1.81  
    1.82     void            *coreLoopReturnPt;//addr to jump to to re-enter coreLoop
    1.83  
    1.84     int32            setupComplete;
    1.85     volatile int32   masterLock;
    1.86 +   
    1.87 +   MallocProlog    *freeListHead[NUM_CORES];
    1.88 +   int32            amtOfOutstandingMem; //total currently allocated
    1.89  
    1.90     int32            numMasterInARow[NUM_CORES];//detect back-to-back masterVP
    1.91 -   GateStruc       *workStealingGates[ NUM_CORES ]; //concurrent work-steal
    1.92 +   GateStruc       *workStealingGates[NUM_CORES]; //concurrent work-steal
    1.93     int32            workStealingLock;
    1.94     
    1.95     InterMasterReqst*  interMasterRequestsFor[NUM_CORES];
    1.96     RequestHandler     interPluginReqHdlr;
    1.97     
    1.98     int32              numProcrsCreated; //gives ordering to processor creation
    1.99 +   
   1.100 +   int32              currentMasterProcrID;
   1.101  
   1.102        //=========== MEASUREMENT STUFF =============
   1.103     IntervalProbe    **intervalProbes;