From: Narasimha S. <nsh...@us...> - 2012-04-13 17:53:07
|
Update of /cvsroot/sblim/sfcb In directory vz-cvs-3.sog:/tmp/cvs-serv5147 Modified Files: brokerOs.c brokerUpc.c native.h Log Message: [ 3517530 ] Implement mark, release routines in CMPIBrokerMemFT Signed-off-by: Narasimha Sharoff <nsh...@us...> Index: brokerUpc.c =================================================================== RCS file: /cvsroot/sblim/sfcb/brokerUpc.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- brokerUpc.c 15 Mar 2012 20:54:03 -0000 1.39 +++ brokerUpc.c 13 Apr 2012 17:53:04 -0000 1.40 @@ -122,8 +122,7 @@ while (se) { - void *hc = markHeap(); /* 3497209:78376 */ - + CMPIGcStat *hc = (void *)(mb->mft->mark(mb, &st)); /* Check for matching FROM class */ for (x=0; x<se->qs->fcNext; x++) { if (CMClassPathIsA(mb, indop, se->qs->fClasses[x], &st)) { @@ -131,8 +130,7 @@ break; } } - - releaseHeap(hc); /* 3497209:78376 - relase objs that are no longer reqd */ + mb->mft->release(mb, hc); if (classMatch && se->exp.ft->evaluate(&se->exp,ind,&st)) { /*apply a propertyfilter in case the query is not "SELECT * FROM ..." */ @@ -1205,13 +1203,14 @@ CMPIBrokerFT *RequestFT = &request_FT; extern CMPIBrokerExtFT brokerExt_FT; +extern CMPIBrokerMemFT brokerMem_FT; static CMPIBroker _broker = { NULL, &request_FT, &native_brokerEncFT, &brokerExt_FT, - NULL + &brokerMem_FT }; CMPIBroker *Broker = &_broker; Index: brokerOs.c =================================================================== RCS file: /cvsroot/sblim/sfcb/brokerOs.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- brokerOs.c 20 May 2008 14:50:22 -0000 1.4 +++ brokerOs.c 13 Apr 2012 17:53:04 -0000 1.5 @@ -242,3 +242,49 @@ }; CMPIBrokerExtFT *CMPI_BrokerExt_Ftab = &brokerExt_FT; + + +/* + * ----------------------------------------------- + * CMPIBrokerMemFT -memory specific CIMOM routines + * ------------------------------------------------ +*/ +extern void *markHeap(); +extern void releaseHeap(void *); + +/* The following two are wrappers for markHeap() and releaseHeap() + * in support.c which allows for provider calls via broker->mft functions +*/ +static CMPIGcStat *mark(const CMPIBroker *mb, CMPIStatus *rc) +{ + return((CMPIGcStat *)markHeap()); +} + +static CMPIStatus release(const CMPIBroker *mb, const CMPIGcStat *gc) +{ + CMPIStatus st = {CMPI_RC_OK, NULL}; + releaseHeap((void *)gc); + return(st); +} + + +CMPIBrokerMemFT brokerMem_FT = { + CMPICurrentVersion, + mark, + release, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL +}; + +CMPIBrokerMemFT *CMPI_BrokerMem_Ftab = &brokerMem_FT; + Index: native.h =================================================================== RCS file: /cvsroot/sblim/sfcb/native.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- native.h 2 Oct 2007 09:02:11 -0000 1.10 +++ native.h 13 Apr 2012 17:53:04 -0000 1.11 @@ -105,6 +105,7 @@ CMPIContext *native_clone_CMPIContext(const CMPIContext *ctx); extern CMPIBrokerExtFT *CMPI_BrokerExt_Ftab; +extern CMPIBrokerMemFT *CMPI_BrokerMem_Ftab; MsgSegment setObjectPathMsgSegment(const CMPIObjectPath * op); CMPIInstance *relocateSerializedInstance(void *area); |