summaryrefslogtreecommitdiffstats
path: root/src/include/usr/targeting/common/target.H
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/usr/targeting/common/target.H')
-rw-r--r--src/include/usr/targeting/common/target.H26
1 files changed, 26 insertions, 0 deletions
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 <targeting/common/attributes.H>
#include <targeting/common/attributeTank.H>
+//******************************************************************************
+// 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<const ATTRIBUTE_ID A>
OpenPOWER on IntegriCloud