Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > SSR_impls > SSR__MC_shared_impl
changeset 80:494703aecda2 Holistic_Model
fixed bug -- when entry empty, req was inserted w/o cloning it first
| author | Sean Halle <seanhalle@yahoo.com> |
|---|---|
| date | Thu, 11 Oct 2012 22:58:35 -0700 |
| parents | ee8510009267 |
| children | 2a64d3178882 |
| files | SSR.c SSR.h SSR_Request_Handlers.c |
| diffstat | 3 files changed, 1 insertions(+), 74 deletions(-) [+] |
line diff
1.1 --- a/SSR.c Mon Sep 17 19:57:40 2012 -0700 1.2 +++ b/SSR.c Thu Oct 11 22:58:35 2012 -0700 1.3 @@ -607,65 +607,6 @@ 1.4 } 1.5 1.6 1.7 -//============================== DKU ================================ 1.8 - 1.9 -/*The DKU pattern is instantiated by registering a divider, a kernel, 1.10 - * and an undivider. These are done by appropriate VMS_App__ calls. 1.11 - *For now, think that things like WorkTable will want their own interface 1.12 - * for divider and undivider.. so here, just do traditional DKU, with the 1.13 - * DKUPiece data struct (include a field for passing info from divider 1.14 - * to unidivider) 1.15 - */ 1.16 -void 1.17 -VMS_App__register_DKU_divider( DKUID ID, DKUDividerFn dividerFn, 1.18 - SlaveVP *animSlv ) 1.19 - { 1.20 - 1.21 - } 1.22 - 1.23 -/*The kernel has no context, so it's created as a task, but it can 1.24 - * communicate, so a suspendable task, just like in VSs. 1.25 - *Will put this DKU into VSs first.. and thinking about forcing every 1.26 - * language to support both tasks and VPs. 1.27 - */ 1.28 -void 1.29 -VMS_App__register_DKU_kernel( DKUID ID, DKUKernelFn kernelFn, 1.30 - SlaveVP *animSlv ) 1.31 - { 1.32 - 1.33 - } 1.34 - 1.35 -void 1.36 -VMS_App__register_DKU_undivider( DKUID ID, DKUUndividerFn undividerFn, 1.37 - SlaveVP *animSlv ) 1.38 - { 1.39 - 1.40 - } 1.41 - 1.42 -DKUInst * 1.43 -VMS_DKU__make_DKU_Instance( DKUInstID DKU_INST_ID ) 1.44 - { int oldSz, i; 1.45 - DKUInstStruc **oldArray; 1.46 - 1.47 - DKUEnvironStruc *E = BLIS__BLISEnvironment->DKUEnvironment; 1.48 - 1.49 - if( E->numDKUInstances <= DKU_INST_ID) E->numDKUInstances = DKU_INST_ID+1; 1.50 - if( DKU_INST_ID >= E->instArraySz ) 1.51 - { //full, so make bigger 1.52 - oldSz = E->instArraySz; 1.53 - oldArray = E->DKUInstStrucs; 1.54 - E->instArraySz *= 2; 1.55 - E->DKUInstStrucs = malloc( E->instArraySz * sizeof(DKUInstStruc *) ); 1.56 - for( i = 0; i < oldSz; i++ ) 1.57 - { E->DKUInstStrucs[i] = oldArray[i]; 1.58 - } 1.59 - free( oldArray ); 1.60 - } 1.61 - E->DKUInstStrucs[ DKU_INST_ID ] = makeDKUInstStruc( DKU_INST_ID ); 1.62 - return E->DKUInstStrucs[ DKU_INST_ID ]; 1.63 - } 1.64 - 1.65 - 1.66 //=========================================================================== 1.67 // 1.68 /*A function singleton is a function whose body executes exactly once, on a
2.1 --- a/SSR.h Mon Sep 17 19:57:40 2012 -0700 2.2 +++ b/SSR.h Thu Oct 11 22:58:35 2012 -0700 2.3 @@ -246,20 +246,6 @@ 2.4 2.5 2.6 2.7 -//=========================== DKU ============================== 2.8 -void 2.9 -VMS_App__register_DKU_divider( DKUID ID, DKUDividerFn dividerFn, 2.10 - SlaveVP *animSlv ); 2.11 -void 2.12 -VMS_App__register_DKU_kernel( DKUID ID, DKUKernelFn kernelFn, 2.13 - SlaveVP *animSlv ); 2.14 - 2.15 -void 2.16 -VMS_App__register_DKU_undivider( DKUID ID, DKUUndividerFn undividerFn, 2.17 - SlaveVP *animSlv ); 2.18 - 2.19 - 2.20 - 2.21 //======================= Concurrency Stuff ====================== 2.22 void 2.23 SSR__start_fn_singleton( int32 singletonID, SlaveVP *animSlv );
3.1 --- a/SSR_Request_Handlers.c Mon Sep 17 19:57:40 2012 -0700 3.2 +++ b/SSR_Request_Handlers.c Thu Oct 11 22:58:35 2012 -0700 3.3 @@ -54,7 +54,7 @@ 3.4 waitingReq = (SSRSemReq *)entry->content; 3.5 if( waitingReq == NULL ) //might happen when last waiting gets paired 3.6 { //no waiting sends or receives, so add this request and exit 3.7 - entry->content = semReq; 3.8 + entry->content = cloneReq( semReq ); 3.9 return NULL; 3.10 } 3.11 return entry;
