# HG changeset patch # User Me # Date 1277232812 25200 # Node ID c3e6c3fda84ea64c1b4c8eaf4f9525f0cd30f9b1 # Parent cb10b58404abc7bfc3fef860e8dab78b7d6f1224 Forgot to commit after had working test -- changed stack & frame ptrs in thd params to be instead in virt procr struc -- stopped working! Saving now, then going back to way had it.. diff -r cb10b58404ab -r c3e6c3fda84e VMS.h --- a/VMS.h Tue Jun 22 11:53:23 2010 -0700 +++ b/VMS.h Tue Jun 22 11:53:32 2010 -0700 @@ -23,37 +23,55 @@ //#define thdAttrs NULL //For PThreads -typedef struct _WorkUnit WorkUnit; +typedef struct _SchedSlot SchedSlot; +typedef struct _SlaveReqst SlaveReqst; typedef struct _VirtProcr VirtProcr; -typedef struct _SlaveReqst SlaveReqst; -typedef struct _SchedSlot SchedSlot; typedef bool8 (*SlaveScheduler) ( SchedSlot *, void * ); typedef void (*RequestHandler) ( SlaveReqst * ); typedef void (*VirtProcrFnPtr) ( void *, VirtProcr * ); typedef void VirtProcrFn( void *, VirtProcr * ); + typedef struct { void *endThdPt; unsigned int coreNum; +// void *framePtr; +// void *stackPtr; } ThdParams; + struct _SchedSlot { int workIsDone; int needsProcrAssigned; VirtProcr *procrAssignedToSlot; }; +//SchedSlot + +struct _SlaveReqst + { + VirtProcr *slaveFrom; + int reqType; //for future when have I/O and OS services + void *semReqData; + + SlaveReqst *nextRequest; + }; +//SlaveReqst struct _VirtProcr { int procrID; //for debugging -- count up each time create + int coreAnimatedBy; void *stackPtr; void *framePtr; void *nextInstrPt; + void *coreLoopStartPt; //allows proto-runtime to be linked later + void *coreLoopFramePtr; //restore before jmp back to core loop + void *coreLoopStackPtr; //restore before jmp back to core loop void *initialData; @@ -62,10 +80,10 @@ void *semanticData; }; +//VirtProcr -//When optimize make a separate flat array in here for each flag in SchedSlot -//So that polling done flags is fast.. not sure even worth it, though.. + typedef struct { SlaveScheduler slaveScheduler; @@ -80,20 +98,13 @@ VirtProcr *masterVirtPr; void *semanticEnv; void *OSEventStruc; //for future, when add I/O to BLIS + + void *coreLoopShutDownPt; //addr to jump to to shut down a coreLoop } MasterEnv; - -struct _SlaveReqst - { - VirtProcr *slaveFrom; - int reqType; //for future when have I/O and OS services - void *semReqData; - - SlaveReqst *nextRequest; - }; - +//========================================================== DWORD WINAPI coreLoop( LPVOID paramsIn ); //void * coreLoop( void *paramsIn ); //standard PThreads fn prototype