Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > SSR_impls > SSR__MC_shared_impl
comparison SSR.c @ 81:2a64d3178882
Updated copyright
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Fri, 28 Dec 2012 09:30:00 -0800 |
| parents | ee8510009267 |
| children | 724b5fbcdd57 |
comparison
equal
deleted
inserted
replaced
| 8:c31f2e3a7a89 | 9:db427d4998ad |
|---|---|
| 605 | 605 |
| 606 return receivePr->dataRetFromReq; | 606 return receivePr->dataRetFromReq; |
| 607 } | 607 } |
| 608 | 608 |
| 609 | 609 |
| 610 //============================== DKU ================================ | |
| 611 | |
| 612 /*The DKU pattern is instantiated by registering a divider, a kernel, | |
| 613 * and an undivider. These are done by appropriate VMS_App__ calls. | |
| 614 *For now, think that things like WorkTable will want their own interface | |
| 615 * for divider and undivider.. so here, just do traditional DKU, with the | |
| 616 * DKUPiece data struct (include a field for passing info from divider | |
| 617 * to unidivider) | |
| 618 */ | |
| 619 void | |
| 620 VMS_App__register_DKU_divider( DKUID ID, DKUDividerFn dividerFn, | |
| 621 SlaveVP *animSlv ) | |
| 622 { | |
| 623 | |
| 624 } | |
| 625 | |
| 626 /*The kernel has no context, so it's created as a task, but it can | |
| 627 * communicate, so a suspendable task, just like in VSs. | |
| 628 *Will put this DKU into VSs first.. and thinking about forcing every | |
| 629 * language to support both tasks and VPs. | |
| 630 */ | |
| 631 void | |
| 632 VMS_App__register_DKU_kernel( DKUID ID, DKUKernelFn kernelFn, | |
| 633 SlaveVP *animSlv ) | |
| 634 { | |
| 635 | |
| 636 } | |
| 637 | |
| 638 void | |
| 639 VMS_App__register_DKU_undivider( DKUID ID, DKUUndividerFn undividerFn, | |
| 640 SlaveVP *animSlv ) | |
| 641 { | |
| 642 | |
| 643 } | |
| 644 | |
| 645 DKUInst * | |
| 646 VMS_DKU__make_DKU_Instance( DKUInstID DKU_INST_ID ) | |
| 647 { int oldSz, i; | |
| 648 DKUInstStruc **oldArray; | |
| 649 | |
| 650 DKUEnvironStruc *E = BLIS__BLISEnvironment->DKUEnvironment; | |
| 651 | |
| 652 if( E->numDKUInstances <= DKU_INST_ID) E->numDKUInstances = DKU_INST_ID+1; | |
| 653 if( DKU_INST_ID >= E->instArraySz ) | |
| 654 { //full, so make bigger | |
| 655 oldSz = E->instArraySz; | |
| 656 oldArray = E->DKUInstStrucs; | |
| 657 E->instArraySz *= 2; | |
| 658 E->DKUInstStrucs = malloc( E->instArraySz * sizeof(DKUInstStruc *) ); | |
| 659 for( i = 0; i < oldSz; i++ ) | |
| 660 { E->DKUInstStrucs[i] = oldArray[i]; | |
| 661 } | |
| 662 free( oldArray ); | |
| 663 } | |
| 664 E->DKUInstStrucs[ DKU_INST_ID ] = makeDKUInstStruc( DKU_INST_ID ); | |
| 665 return E->DKUInstStrucs[ DKU_INST_ID ]; | |
| 666 } | |
| 667 | |
| 668 | |
| 669 //=========================================================================== | 610 //=========================================================================== |
| 670 // | 611 // |
| 671 /*A function singleton is a function whose body executes exactly once, on a | 612 /*A function singleton is a function whose body executes exactly once, on a |
| 672 * single core, no matter how many times the fuction is called and no | 613 * single core, no matter how many times the fuction is called and no |
| 673 * matter how many cores or the timing of cores calling it. | 614 * matter how many cores or the timing of cores calling it. |
