Mercurial > cgi-bin > hgwebdir.cgi > VMS > VMS_Implementations > SSR_impls > SSR__MC_shared_impl
changeset 2:f6b960f40005
Debugging -- middle of debugging frenzy before PPoPP deadline
| author | Me |
|---|---|
| date | Mon, 26 Jul 2010 15:26:57 -0700 |
| parents | 06ca89bafbb8 |
| children | 9f2e23d38ff2 |
| files | VMSHW_PluginFns.c VMSHW_Request_Handlers.c VMSHW_lib.c |
| diffstat | 3 files changed, 18 insertions(+), 13 deletions(-) [+] |
line diff
1.1 --- a/VMSHW_PluginFns.c Wed Jul 07 13:15:29 2010 -0700 1.2 +++ b/VMSHW_PluginFns.c Mon Jul 26 15:26:57 2010 -0700 1.3 @@ -8,7 +8,6 @@ 1.4 #include <stdlib.h> 1.5 #include <malloc.h> 1.6 1.7 -#include "VMS/VMS.h" 1.8 #include "VMS/Queue_impl/PrivateQueue.h" 1.9 #include "VMSHW.h" 1.10 #include "VMSHW_Request_Handlers.h" 1.11 @@ -39,7 +38,7 @@ 1.12 if( VMS__isSemanticReqst( req ) ) 1.13 { 1.14 semReq = VMS__take_sem_reqst_from( req ); 1.15 - if( semReq == NULL ) goto DoneWithReqst; 1.16 + if( semReq == NULL ) goto DoneHandlingReqst; 1.17 switch( semReq->reqType ) 1.18 { 1.19 case send_type: handleSendType( semReq, semEnv); 1.20 @@ -57,6 +56,7 @@ 1.21 VMSHW__free_semantic_request( semReq ); 1.22 break; 1.23 } 1.24 + //NOTE: freeing semantic request data strucs handled inside these 1.25 } 1.26 else if( VMS__isCreateReqst( req ) ) //only plugin can add to ready Q 1.27 { VirtProcr * 1.28 @@ -81,9 +81,12 @@ 1.29 writePrivQ( shutdownPr, semEnv->readyVirtProcrQ ); 1.30 } 1.31 } 1.32 - 1.33 - DoneWithReqst: 1.34 - VMS__free_request( req ); 1.35 + 1.36 + DoneHandlingReqst: 1.37 + //Free VMS portion of request, no matter what -- sem request data 1.38 + // struc instances may still be around.. VMS__free_request doesn't 1.39 + // affect the semantic request that was carried by it 1.40 + VMS__free_request( req ); 1.41 req = VMS__take_top_request_from( requestingPr ); 1.42 } //while( req != NULL ) 1.43 }
2.1 --- a/VMSHW_Request_Handlers.c Wed Jul 07 13:15:29 2010 -0700 2.2 +++ b/VMSHW_Request_Handlers.c Mon Jul 26 15:26:57 2010 -0700 2.3 @@ -19,7 +19,7 @@ 2.4 // Helpers 2.5 2.6 HashEntry * 2.7 -lookupReqAndGiveEntryElseInsertIfEmpty( char *key, VMSHWSemReq *semReq, 2.8 +giveEntryElseInsertReqst( char *key, VMSHWSemReq *semReq, 2.9 HashTable *commHashTbl ) 2.10 { HashEntry *entry; 2.11 VMSHWSemReq *waitingReq; 2.12 @@ -80,9 +80,9 @@ 2.13 //TODO: use a faster hash function -- see notes in intelligence gather 2.14 key[0] = (int)receivePr; 2.15 key[1] = (int)(semReq->msgType); 2.16 - //key[2] acts at the 0 that terminates the string 2.17 + //key[2] acts as the 0 that terminates the string 2.18 2.19 - entry = lookupReqAndGiveEntryElseInsertIfEmpty( key, semReq, commHashTbl); 2.20 + entry = giveEntryElseInsertReqst( key, semReq, commHashTbl); 2.21 if( entry == NULL ) return; //was just inserted 2.22 2.23 waitingReq = (VMSHWSemReq *)entry->content; 2.24 @@ -112,7 +112,7 @@ 2.25 receivePr->semanticData = semReq->msg; 2.26 2.27 //bring both processors back from suspend 2.28 - writePrivQ( sendPr, semEnv->readyVirtProcrQ ); 2.29 + writePrivQ( sendPr, semEnv->readyVirtProcrQ ); 2.30 writePrivQ( receivePr, semEnv->readyVirtProcrQ ); 2.31 2.32 //don't need semReq anymore -- free it 2.33 @@ -141,7 +141,7 @@ 2.34 key[1] = (int)sendPr; 2.35 //key[2] acts at the 0 that terminates the string 2.36 2.37 - entry = lookupReqAndGiveEntryElseInsertIfEmpty( key, semReq, commHashTbl); 2.38 + entry = giveEntryElseInsertReqst( key, semReq, commHashTbl); 2.39 if( entry == NULL ) return; //was just inserted 2.40 2.41 waitingReq = (VMSHWSemReq *)entry->content; 2.42 @@ -225,7 +225,7 @@ 2.43 //key[2] acts at the 0 that terminates the string 2.44 2.45 2.46 - entry = lookupReqAndGiveEntryElseInsertIfEmpty( key, semReq, commHashTbl); 2.47 + entry = giveEntryElseInsertReqst( key, semReq, commHashTbl); 2.48 if( entry == NULL ) return; //was just inserted 2.49 2.50 waitingReq = (VMSHWSemReq *)entry->content; 2.51 @@ -273,7 +273,7 @@ 2.52 key[1] = (int)sendPr; 2.53 //key[2] acts at the 0 that terminates the string 2.54 2.55 - entry = lookupReqAndGiveEntryElseInsertIfEmpty( key, semReq, commHashTbl); 2.56 + entry = giveEntryElseInsertReqst( key, semReq, commHashTbl); 2.57 if( entry == NULL ) return; //was just inserted 2.58 2.59 waitingReq = (VMSHWSemReq *)entry->content;
3.1 --- a/VMSHW_lib.c Wed Jul 07 13:15:29 2010 -0700 3.2 +++ b/VMSHW_lib.c Mon Jul 26 15:26:57 2010 -0700 3.3 @@ -186,7 +186,9 @@ 3.4 void * 3.5 VMSHW__malloc_size_to( int numBytes, VirtProcr *ownerPr ) 3.6 { 3.7 - 3.8 +//TODO: Put in the ownership system from DKU -- have it working, just adapt 3.9 +// it to here 3.10 + return malloc( numBytes ); 3.11 } 3.12 3.13
