changeset 20:09e0029ee0c9

Full VMS test -- works
author Me
date Wed, 30 Jun 2010 13:10:26 -0700
parents 345d14338769
children a0af8d4fca35
files CoreLoop.c
diffstat 1 files changed, 3 insertions(+), 34 deletions(-) [+]
line diff
     1.1 --- a/CoreLoop.c	Tue Jun 22 12:55:55 2010 -0700
     1.2 +++ b/CoreLoop.c	Wed Jun 30 13:10:26 2010 -0700
     1.3 @@ -64,7 +64,8 @@
     1.4        // which forces reloading the pointer after each jmp to this point
     1.5     workQ  = _VMSWorkQ;
     1.6     currPr = (VirtProcr *) readCASQ( workQ );
     1.7 -   currPr->coreLoopStartPt = &&CoreLoopStartPt;  //just to be sure..
     1.8 +
     1.9 +   currPr->coreLoopStartPt = &&CoreLoopStartPt;  //just to be sure.(GCC spec)
    1.10     
    1.11     currPr->coreAnimatedBy  = coreLoopThdParams->coreNum;
    1.12  
    1.13 @@ -87,6 +88,7 @@
    1.14        //Explicitly loading into eax before changing frame-ptr fixed it
    1.15        //Also, it turns "(currPr->coreLoopFramePtr)" into a temporary on the
    1.16        // stack, so "movl %%ebp, %0" saves to the temp, NOT the data-struc!
    1.17 +//coreLoop
    1.18     asm volatile("movl %0, %%eax;      \
    1.19                   movl %%esp, (%%eax); \
    1.20                   movl %1, %%eax;      \
    1.21 @@ -107,36 +109,3 @@
    1.22     EndCoreLoop:
    1.23     ExitThread( 0 );
    1.24   }
    1.25 -
    1.26 -void
    1.27 -postJumpTestFn( void *dummy, VirtProcr *animatingPr )
    1.28 - {
    1.29 -   //============== test ===============
    1.30 -      //switch to stack ptr and frame ptr of virt procr
    1.31 -   void *stackInitData, *stackAnimPr, *framePtr;
    1.32 -
    1.33 -      //Get the input params:
    1.34 -      //The return addr and the old frame ptr have been pushed, then the new
    1.35 -      // frame ptr set to top-of-stack -- so there are 2 values between
    1.36 -      // frame ptr and the input params -- offset past those and get the
    1.37 -      // input params.
    1.38 -   asm volatile("movl 0x8(%%ebp), %0; \
    1.39 -                 movl 0xc(%%ebp), %1; \
    1.40 -                 movl %%ebp, %2 "     \
    1.41 -   /* outputs */ : "=r" (stackInitData), "=r"(stackAnimPr), "=r"(framePtr) \
    1.42 -   /* inputs  */ :                                             \
    1.43 -                );
    1.44 -
    1.45 -
    1.46 -   printf( "\njump to function start! | %d | %d | %d \n", (int)stackInitData,
    1.47 -                                        ((VirtProcr *)stackAnimPr)->procrID),
    1.48 -                                        framePtr;
    1.49 -
    1.50 -   VMS__suspend_processor( animatingPr );
    1.51 -
    1.52 -   printf( "\n came back from suspend -- wooohooo !\n" );
    1.53 -
    1.54 -   //============== end test =============
    1.55 -
    1.56 -   ExitThread( 0 );
    1.57 - }
    1.58 \ No newline at end of file