# HG changeset patch # User Me # Date 1277928626 25200 # Node ID 09e0029ee0c9568e9963144949ce3b335ddc3948 # Parent 345d143387695c05a5c70ed1791b382da4d8d8da Full VMS test -- works diff -r 345d14338769 -r 09e0029ee0c9 CoreLoop.c --- a/CoreLoop.c Tue Jun 22 12:55:55 2010 -0700 +++ b/CoreLoop.c Wed Jun 30 13:10:26 2010 -0700 @@ -64,7 +64,8 @@ // which forces reloading the pointer after each jmp to this point workQ = _VMSWorkQ; currPr = (VirtProcr *) readCASQ( workQ ); - currPr->coreLoopStartPt = &&CoreLoopStartPt; //just to be sure.. + + currPr->coreLoopStartPt = &&CoreLoopStartPt; //just to be sure.(GCC spec) currPr->coreAnimatedBy = coreLoopThdParams->coreNum; @@ -87,6 +88,7 @@ //Explicitly loading into eax before changing frame-ptr fixed it //Also, it turns "(currPr->coreLoopFramePtr)" into a temporary on the // stack, so "movl %%ebp, %0" saves to the temp, NOT the data-struc! +//coreLoop asm volatile("movl %0, %%eax; \ movl %%esp, (%%eax); \ movl %1, %%eax; \ @@ -107,36 +109,3 @@ EndCoreLoop: ExitThread( 0 ); } - -void -postJumpTestFn( void *dummy, VirtProcr *animatingPr ) - { - //============== test =============== - //switch to stack ptr and frame ptr of virt procr - void *stackInitData, *stackAnimPr, *framePtr; - - //Get the input params: - //The return addr and the old frame ptr have been pushed, then the new - // frame ptr set to top-of-stack -- so there are 2 values between - // frame ptr and the input params -- offset past those and get the - // input params. - asm volatile("movl 0x8(%%ebp), %0; \ - movl 0xc(%%ebp), %1; \ - movl %%ebp, %2 " \ - /* outputs */ : "=r" (stackInitData), "=r"(stackAnimPr), "=r"(framePtr) \ - /* inputs */ : \ - ); - - - printf( "\njump to function start! | %d | %d | %d \n", (int)stackInitData, - ((VirtProcr *)stackAnimPr)->procrID), - framePtr; - - VMS__suspend_processor( animatingPr ); - - printf( "\n came back from suspend -- wooohooo !\n" ); - - //============== end test ============= - - ExitThread( 0 ); - } \ No newline at end of file