From d615a4879c5e0a3dcd2cf09967bb091eb6f85cbd Mon Sep 17 00:00:00 2001 From: Mike Jones Date: Mon, 29 Apr 2013 13:34:57 -0500 Subject: Reduce FAPI->TARG attribute access code size Change-Id: I5fe3e7be1780d6034d2c52ef0dac6799f3c89d3b RTC: 70572 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4276 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton Reviewed-by: A. Patrick Williams III --- src/include/usr/targeting/common/target.H | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/include/usr/targeting') diff --git a/src/include/usr/targeting/common/target.H b/src/include/usr/targeting/common/target.H index 16b2a8c51..496636a57 100644 --- a/src/include/usr/targeting/common/target.H +++ b/src/include/usr/targeting/common/target.H @@ -50,6 +50,23 @@ #include #include +//****************************************************************************** +// Forward declarations to allow friend functions to work +//****************************************************************************** +namespace fapi +{ + class ReturnCode; + class Target; + + namespace platAttrSvc + { + fapi::ReturnCode getTargetingAttr(const fapi::Target *, + const TARGETING::ATTRIBUTE_ID, const uint32_t, void *); + fapi::ReturnCode setTargetingAttr(const fapi::Target *, + const TARGETING::ATTRIBUTE_ID, const uint32_t, void *); + } +} + namespace TARGETING { @@ -469,6 +486,15 @@ class Target friend class PnorBuilderService; + // Friend functions to allow FAPI Attribute code to directly call + // _tryGetAttr and _trySetAttr for code size optimization + friend fapi::ReturnCode fapi::platAttrSvc::getTargetingAttr( + const fapi::Target *, TARGETING::ATTRIBUTE_ID, const uint32_t, + void *); + friend fapi::ReturnCode fapi::platAttrSvc::setTargetingAttr( + const fapi::Target *, TARGETING::ATTRIBUTE_ID, const uint32_t, + void *); + } PACKED; template -- cgit v1.2.3