Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > VMS_impls > VMS__MC_shared_impl
comparison AnimationMaster.c @ 285:7b6f8cf08b1f
Minor -- gave malloc its own lock and renamed TopLevelFn to BirthFn
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Wed, 12 Jun 2013 14:12:06 -0700 |
| parents | 72ffdb11ad8e |
| children | 744b5ff9851e |
comparison
equal
deleted
inserted
replaced
| 21:656c34fb168f | 22:f329431e47e5 |
|---|---|
| 31 | 31 |
| 32 inline void | 32 inline void |
| 33 handleMakeProbe( PRServiceReq *langReq, PRLangEnv *protoLangEnv ); | 33 handleMakeProbe( PRServiceReq *langReq, PRLangEnv *protoLangEnv ); |
| 34 inline void | 34 inline void |
| 35 handleThrowException( PRServiceReq *langReq, PRLangEnv *protoLangEnv ); | 35 handleThrowException( PRServiceReq *langReq, PRLangEnv *protoLangEnv ); |
| 36 | |
| 37 void | |
| 38 debug_print_req(AnimSlot *slot, PRReqst *req); | |
| 36 | 39 |
| 37 //=========================================================================== | 40 //=========================================================================== |
| 38 | 41 |
| 39 /*Note: there used to be a coreController that was another animation | 42 /*Note: there used to be a coreController that was another animation |
| 40 * layer below both the masterVP and the slaveVPs.. in that case, the | 43 * layer below both the masterVP and the slaveVPs.. in that case, the |
| 71 //NOTE: left over from when had a coreController & MasterVP managed | 74 //NOTE: left over from when had a coreController & MasterVP managed |
| 72 // several slots | 75 // several slots |
| 73 if( slot->workIsDone ) | 76 if( slot->workIsDone ) |
| 74 { slot->workIsDone = FALSE; | 77 { slot->workIsDone = FALSE; |
| 75 slot->needsWorkAssigned = TRUE; | 78 slot->needsWorkAssigned = TRUE; |
| 76 printf("top handle request: %d | reqType: %d\n", slot->coreSlotIsOn, (int32)req->reqType );fflush(stdin); | |
| 77 | 79 |
| 78 //An Idle VP has no request to handle, so skip to assign.. | 80 //An Idle VP has no request to handle, so skip to assign.. |
| 79 if( slot->slaveAssignedToSlot->typeOfVP != IdleVP && | 81 if( slot->slaveAssignedToSlot->typeOfVP != IdleVP && |
| 80 slot->slaveAssignedToSlot->typeOfVP != ShutdownVP) | 82 slot->slaveAssignedToSlot->typeOfVP != ShutdownVP) |
| 81 { | 83 { |
| 84 | 86 |
| 85 | 87 |
| 86 //process the request made by the slave (held inside slave struc) | 88 //process the request made by the slave (held inside slave struc) |
| 87 slave = slot->slaveAssignedToSlot; | 89 slave = slot->slaveAssignedToSlot; |
| 88 req = slave->request; | 90 req = slave->request; |
| 91 debug_print_req(slot, req); | |
| 89 | 92 |
| 90 //If the requesting slave is a slot slave, and request is not | 93 //If the requesting slave is a slot slave, and request is not |
| 91 // task-end, then turn it into a free task slave & continue | 94 // task-end, then turn it into a free task slave & continue |
| 92 if( slave->typeOfVP == SlotTaskSlv && req->reqType != TaskEnd ) | 95 if( slave->typeOfVP == SlotTaskSlv && req->reqType != TaskEnd ) |
| 93 PR_int__replace_with_new_slot_slv( slave ); | 96 PR_int__replace_with_new_slot_slv( slave ); |
| 590 PR_int__throw_exception( langReq->msgStr, langReq->requestingSlv, langReq->exceptionData ); | 593 PR_int__throw_exception( langReq->msgStr, langReq->requestingSlv, langReq->exceptionData ); |
| 591 | 594 |
| 592 (*protoLangEnv->makeSlaveReadyFn)( langReq->requestingSlv, PR_int__give_lang_env(protoLangEnv) ); | 595 (*protoLangEnv->makeSlaveReadyFn)( langReq->requestingSlv, PR_int__give_lang_env(protoLangEnv) ); |
| 593 } | 596 } |
| 594 | 597 |
| 598 void | |
| 599 debug_print_req(AnimSlot *slot, PRReqst *req) | |
| 600 { | |
| 601 if(dbgMaster) | |
| 602 { printf("top handle request: %d | reqType: ", slot->coreSlotIsOn ); | |
| 603 switch(req->reqType) | |
| 604 { case TaskCreate: printf("TaskCreate \n"); break; | |
| 605 case TaskEnd: printf("TaskEnd \n"); break; | |
| 606 case SlvCreate: printf("SlvCreate \n"); break; | |
| 607 case SlvDissipate: printf("SlvDissipate \n"); break; | |
| 608 case Language: printf("Language \n"); break; | |
| 609 case Service: printf("Service \n"); break; | |
| 610 case Hardware: printf("Hardware \n"); break; | |
| 611 case IO: printf("IO \n"); break; | |
| 612 case OSCall: printf("OSCall \n"); break; | |
| 613 case LangShutdown: printf("LangShutdown \n"); break; | |
| 614 case ProcessEnd: printf("ProcessEnd \n"); break; | |
| 615 case PRShutdown: printf("PRShutdown \n"); break; | |
| 616 } | |
| 617 fflush(stdin); | |
| 618 } | |
| 619 } | |
| 620 | |
| 621 |
