summaryrefslogtreecommitdiffstats
path: root/src/include/usr/fapi2
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2016-05-19 13:06:17 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2016-06-06 12:54:51 -0400
commitc6885d24740b8491bd927feeb7c4688368dbf5a2 (patch)
tree58dabec6107fd31006fbb7b4a90518bfb956b068 /src/include/usr/fapi2
parentd7ee93594674f6321985f4b248d67eccb2e631af (diff)
downloadblackbird-hostboot-c6885d24740b8491bd927feeb7c4688368dbf5a2.tar.gz
blackbird-hostboot-c6885d24740b8491bd927feeb7c4688368dbf5a2.zip
add platform support for fapi2::Target<K>.isFunctional()
Change-Id: I265f34327c5bd593ee1d6f13f6cd19d191db66fd RTC:154321 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24991 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Matt Derksen <v2cibmd@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/include/usr/fapi2')
-rw-r--r--src/include/usr/fapi2/target.H14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/include/usr/fapi2/target.H b/src/include/usr/fapi2/target.H
index 5912f6045..255f66dd5 100644
--- a/src/include/usr/fapi2/target.H
+++ b/src/include/usr/fapi2/target.H
@@ -487,7 +487,7 @@ inline Target<T> Target<K, V>::getParent(void) const
TARGETING::UTIL_FILTER_ALL);
}
- assert(l_parentList.size() == 1, "Found %d parents of the same type. Target HUID %x , \
+ assert(l_parentList.size() == 1, "Found %d parents of the same type. Target HUID %x ,\
looking for parents of type %x", l_parentList.size(), TARGETING::get_huid(this->get()) , requiredPType);
TARGETING::Target * l_parentTarget = l_parentList[0];
@@ -846,6 +846,18 @@ Target<K, V>::getOtherEnd(fapi2::Target<T>& o_target,
///
+/// @brief Determine whether the target is functional or not
+/// @return true if the target is functional, false otherwise
+///
+template< TargetType K, typename V >
+inline bool Target< K, V >::isFunctional(void) const
+{
+ TARGETING::PredicateIsFunctional l_functional;
+ return l_functional(static_cast<TARGETING::Target*>(this->get()));
+}
+
+
+///
/// @brief Return the string interpretation of this target
/// @tparam T The type of the target
/// @param[in] i_target Target<T>
OpenPOWER on IntegriCloud