comparison VMS.c @ 63:a6c442d52590

removed all inline, to see if -O3 works -- now -O0 broken too! will go back
author Me
date Fri, 12 Nov 2010 08:42:25 -0800
parents dd3e60aeae26
children
comparison
equal deleted inserted replaced
30:9d09d6178f9c 31:8b1fa9e82ad5
259 * function call 259 * function call
260 *No need to save registers on old stack frame, because there's no old 260 *No need to save registers on old stack frame, because there's no old
261 * animator state to return to -- 261 * animator state to return to --
262 * 262 *
263 */ 263 */
264 inline VirtProcr * 264 VirtProcr *
265 create_procr_helper( VirtProcr *newPr, VirtProcrFnPtr fnPtr, 265 create_procr_helper( VirtProcr *newPr, VirtProcrFnPtr fnPtr,
266 void *initialData, char *stackLocs ) 266 void *initialData, char *stackLocs )
267 { 267 {
268 char *stackPtr; 268 char *stackPtr;
269 269
296 //======================================================================== 296 //========================================================================
297 297
298 return newPr; 298 return newPr;
299 } 299 }
300 300
301 inline VirtProcr * 301 VirtProcr *
302 VMS__create_procr( VirtProcrFnPtr fnPtr, void *initialData ) 302 VMS__create_procr( VirtProcrFnPtr fnPtr, void *initialData )
303 { VirtProcr *newPr; 303 { VirtProcr *newPr;
304 char *stackLocs; 304 char *stackLocs;
305 305
306 newPr = VMS__malloc( sizeof(VirtProcr) ); 306 newPr = VMS__malloc( sizeof(VirtProcr) );
313 313
314 /* "ext" designates that it's for use outside the VMS system -- should only 314 /* "ext" designates that it's for use outside the VMS system -- should only
315 * be called from main thread or other thread -- never from code animated by 315 * be called from main thread or other thread -- never from code animated by
316 * a VMS virtual processor. 316 * a VMS virtual processor.
317 */ 317 */
318 inline VirtProcr * 318 VirtProcr *
319 VMS_ext__create_procr( VirtProcrFnPtr fnPtr, void *initialData ) 319 VMS_ext__create_procr( VirtProcrFnPtr fnPtr, void *initialData )
320 { VirtProcr *newPr; 320 { VirtProcr *newPr;
321 char *stackLocs; 321 char *stackLocs;
322 322
323 newPr = malloc( sizeof(VirtProcr) ); 323 newPr = malloc( sizeof(VirtProcr) );
501 * be malloc'd if this is called inside the same call chain before the 501 * be malloc'd if this is called inside the same call chain before the
502 * send of the last request is called. 502 * send of the last request is called.
503 * 503 *
504 *The request handler has to call VMS__free_VMSReq for any of these 504 *The request handler has to call VMS__free_VMSReq for any of these
505 */ 505 */
506 inline void 506 void
507 VMS__add_sem_request_in_mallocd_VMSReqst( void *semReqData, 507 VMS__add_sem_request_in_mallocd_VMSReqst( void *semReqData,
508 VirtProcr *callingPr ) 508 VirtProcr *callingPr )
509 { VMSReqst *req; 509 { VMSReqst *req;
510 510
511 req = VMS__malloc( sizeof(VMSReqst) ); 511 req = VMS__malloc( sizeof(VMSReqst) );
518 /*This inserts the semantic-layer's request data into standard VMS carrier 518 /*This inserts the semantic-layer's request data into standard VMS carrier
519 * request data-struct is allocated on stack of this call & ptr to it sent 519 * request data-struct is allocated on stack of this call & ptr to it sent
520 * to plugin 520 * to plugin
521 *Then it does suspend, to cause request to be sent. 521 *Then it does suspend, to cause request to be sent.
522 */ 522 */
523 inline void 523 void
524 VMS__send_sem_request( void *semReqData, VirtProcr *callingPr ) 524 VMS__send_sem_request( void *semReqData, VirtProcr *callingPr )
525 { VMSReqst req; 525 { VMSReqst req;
526 526
527 req.reqType = semantic; 527 req.reqType = semantic;
528 req.semReqData = semReqData; 528 req.semReqData = semReqData;
531 531
532 VMS__suspend_procr( callingPr ); 532 VMS__suspend_procr( callingPr );
533 } 533 }
534 534
535 535
536 inline void 536 void
537 VMS__send_VMSSem_request( void *semReqData, VirtProcr *callingPr ) 537 VMS__send_VMSSem_request( void *semReqData, VirtProcr *callingPr )
538 { VMSReqst req; 538 { VMSReqst req;
539 539
540 req.reqType = VMSSemantic; 540 req.reqType = VMSSemantic;
541 req.semReqData = semReqData; 541 req.semReqData = semReqData;
558 procrWithReq->requests = procrWithReq->requests->nextReqst; 558 procrWithReq->requests = procrWithReq->requests->nextReqst;
559 return req; 559 return req;
560 } 560 }
561 561
562 562
563 inline void * 563 void *
564 VMS__take_sem_reqst_from( VMSReqst *req ) 564 VMS__take_sem_reqst_from( VMSReqst *req )
565 { 565 {
566 return req->semReqData; 566 return req->semReqData;
567 } 567 }
568 568
580 * 580 *
581 * TODO: Later change this, to give probes their own separate plugin & have 581 * TODO: Later change this, to give probes their own separate plugin & have
582 * VMS-core steer the request to appropriate plugin 582 * VMS-core steer the request to appropriate plugin
583 * Do the same for OS calls -- look later at it.. 583 * Do the same for OS calls -- look later at it..
584 */ 584 */
585 void inline 585 void
586 VMS__handle_VMSSemReq( VMSReqst *req, VirtProcr *requestingPr, void *semEnv, 586 VMS__handle_VMSSemReq( VMSReqst *req, VirtProcr *requestingPr, void *semEnv,
587 ResumePrFnPtr resumePrFnPtr ) 587 ResumePrFnPtr resumePrFnPtr )
588 { VMSSemReq *semReq; 588 { VMSSemReq *semReq;
589 IntervalProbe *newProbe; 589 IntervalProbe *newProbe;
590 int32 nameLen; 590 int32 nameLen;