summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting/target.C
diff options
context:
space:
mode:
authorNick Bofferding <bofferdn@us.ibm.com>2011-11-09 18:15:33 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-11-16 10:07:41 -0600
commit6f1adaf68285ef70e1c69d57b01c5c7b6d7fb2e6 (patch)
tree9538afbe255b4f4d1e9bf9cd878ad4e89f43844c /src/usr/targeting/target.C
parent4d9344f1025ee77e24e88249dd3e32f3d4c9a3ba (diff)
downloadtalos-hostboot-6f1adaf68285ef70e1c69d57b01c5c7b6d7fb2e6.tar.gz
talos-hostboot-6f1adaf68285ef70e1c69d57b01c5c7b6d7fb2e6.zip
Support host boot mutex attributes
- Prevented mutex attributes from being copied in target APIs - Added target APIs to get/tryGet mutex attribute references - Added testcases to verify mutex attributes - Added mutex attribute type to XML definition - Added test mutex attribute to system target XML definition - Modified attribute compiler to support mutex attributes and restrictions - Replaced 100000 cycle loop in synctest.H with nanosleep for 10 CTX switches - Added context switch time macros to time.h - Removed context switch time macros from taskwaittest.H and renamed existing macro calls - Removed context switch time macros from synctest.H and renamed existing macro calls Change-Id: I93fecfa75e00e509fa442e4dd5c9e3fd67866e98 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/491 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/target.C')
-rw-r--r--src/usr/targeting/target.C39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/usr/targeting/target.C b/src/usr/targeting/target.C
index f4950c1e7..d6946e050 100644
--- a/src/usr/targeting/target.C
+++ b/src/usr/targeting/target.C
@@ -125,6 +125,45 @@ void Target::_getAttrPtr(
}
//******************************************************************************
+// Target::_getHbMutexAttr
+//******************************************************************************
+
+mutex_t* Target::_getHbMutexAttr(
+ const ATTRIBUTE_ID i_attribute) const
+{
+ #define TARG_FN "_getHbMutexAttr()"
+
+ void* l_pAttr = NULL;
+ (void)_getAttrPtr(i_attribute,l_pAttr);
+
+ //@TODO Remove assert once release has stablized
+ assert(l_pAttr,"TARGETING::Target::_getHbMutexAttr<%d>: _getAttrPtr "
+ "returned NULL",i_attribute);
+
+ return static_cast<mutex_t*>(l_pAttr);
+
+ #undef TARG_FN
+}
+
+//******************************************************************************
+// Target::_tryGetHbMutexAttr
+//******************************************************************************
+
+bool Target::_tryGetHbMutexAttr(
+ const ATTRIBUTE_ID i_attribute,
+ mutex_t*& o_pMutex) const
+{
+ #define TARG_FN "_tryGetHbMutexAttr()"
+
+ void* l_pAttr = NULL;
+ (void)_getAttrPtr(i_attribute,l_pAttr);
+ o_pMutex = static_cast<mutex_t*>(l_pAttr);
+ return (l_pAttr != NULL);
+
+ #undef TARG_FN
+}
+
+//******************************************************************************
// Target::Target
//******************************************************************************
OpenPOWER on IntegriCloud