# HG changeset patch # User Sean Halle # Date 1350021515 25200 # Node ID 494703aecda2fe4c8ff2d4070ddb4f8307d727cd # Parent ee85100092677d1d5efea6046f60d05955bf5cfc fixed bug -- when entry empty, req was inserted w/o cloning it first diff -r ee8510009267 -r 494703aecda2 SSR.c --- a/SSR.c Mon Sep 17 19:57:40 2012 -0700 +++ b/SSR.c Thu Oct 11 22:58:35 2012 -0700 @@ -607,65 +607,6 @@ } -//============================== DKU ================================ - -/*The DKU pattern is instantiated by registering a divider, a kernel, - * and an undivider. These are done by appropriate VMS_App__ calls. - *For now, think that things like WorkTable will want their own interface - * for divider and undivider.. so here, just do traditional DKU, with the - * DKUPiece data struct (include a field for passing info from divider - * to unidivider) - */ -void -VMS_App__register_DKU_divider( DKUID ID, DKUDividerFn dividerFn, - SlaveVP *animSlv ) - { - - } - -/*The kernel has no context, so it's created as a task, but it can - * communicate, so a suspendable task, just like in VSs. - *Will put this DKU into VSs first.. and thinking about forcing every - * language to support both tasks and VPs. - */ -void -VMS_App__register_DKU_kernel( DKUID ID, DKUKernelFn kernelFn, - SlaveVP *animSlv ) - { - - } - -void -VMS_App__register_DKU_undivider( DKUID ID, DKUUndividerFn undividerFn, - SlaveVP *animSlv ) - { - - } - -DKUInst * -VMS_DKU__make_DKU_Instance( DKUInstID DKU_INST_ID ) - { int oldSz, i; - DKUInstStruc **oldArray; - - DKUEnvironStruc *E = BLIS__BLISEnvironment->DKUEnvironment; - - if( E->numDKUInstances <= DKU_INST_ID) E->numDKUInstances = DKU_INST_ID+1; - if( DKU_INST_ID >= E->instArraySz ) - { //full, so make bigger - oldSz = E->instArraySz; - oldArray = E->DKUInstStrucs; - E->instArraySz *= 2; - E->DKUInstStrucs = malloc( E->instArraySz * sizeof(DKUInstStruc *) ); - for( i = 0; i < oldSz; i++ ) - { E->DKUInstStrucs[i] = oldArray[i]; - } - free( oldArray ); - } - E->DKUInstStrucs[ DKU_INST_ID ] = makeDKUInstStruc( DKU_INST_ID ); - return E->DKUInstStrucs[ DKU_INST_ID ]; - } - - //=========================================================================== // /*A function singleton is a function whose body executes exactly once, on a diff -r ee8510009267 -r 494703aecda2 SSR.h --- a/SSR.h Mon Sep 17 19:57:40 2012 -0700 +++ b/SSR.h Thu Oct 11 22:58:35 2012 -0700 @@ -246,20 +246,6 @@ -//=========================== DKU ============================== -void -VMS_App__register_DKU_divider( DKUID ID, DKUDividerFn dividerFn, - SlaveVP *animSlv ); -void -VMS_App__register_DKU_kernel( DKUID ID, DKUKernelFn kernelFn, - SlaveVP *animSlv ); - -void -VMS_App__register_DKU_undivider( DKUID ID, DKUUndividerFn undividerFn, - SlaveVP *animSlv ); - - - //======================= Concurrency Stuff ====================== void SSR__start_fn_singleton( int32 singletonID, SlaveVP *animSlv ); diff -r ee8510009267 -r 494703aecda2 SSR_Request_Handlers.c --- a/SSR_Request_Handlers.c Mon Sep 17 19:57:40 2012 -0700 +++ b/SSR_Request_Handlers.c Thu Oct 11 22:58:35 2012 -0700 @@ -54,7 +54,7 @@ waitingReq = (SSRSemReq *)entry->content; if( waitingReq == NULL ) //might happen when last waiting gets paired { //no waiting sends or receives, so add this request and exit - entry->content = semReq; + entry->content = cloneReq( semReq ); return NULL; } return entry;