diff options
author | Nick Bofferding <bofferdn@us.ibm.com> | 2011-11-09 18:15:33 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2011-11-16 10:07:41 -0600 |
commit | 6f1adaf68285ef70e1c69d57b01c5c7b6d7fb2e6 (patch) | |
tree | 9538afbe255b4f4d1e9bf9cd878ad4e89f43844c /src/usr/testcore/lib | |
parent | 4d9344f1025ee77e24e88249dd3e32f3d4c9a3ba (diff) | |
download | talos-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/testcore/lib')
-rw-r--r-- | src/usr/testcore/lib/synctest.H | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/usr/testcore/lib/synctest.H b/src/usr/testcore/lib/synctest.H index e8b0ef1e0..e1de74843 100644 --- a/src/usr/testcore/lib/synctest.H +++ b/src/usr/testcore/lib/synctest.H @@ -35,9 +35,6 @@ #include <kernel/timemgr.H> -#define NS_PER_SEC (1000000ull) -#define TEN_CTX_SWITCHES ((NS_PER_SEC/TimeManager::TIMESLICE_PER_SEC)*10) - class SyncTest: public CxxTest::TestSuite { public: @@ -66,7 +63,7 @@ class SyncTest: public CxxTest::TestSuite mutex_lock(&mutex); task_create(func2, this); task_create(func2, this); - nanosleep(0,TEN_CTX_SWITCHES); + nanosleep(0,TEN_CTX_SWITCHES_NS); mutex_unlock(&mutex); barrier_wait(&barrier); TS_TRACE("ALL THREADS ENDED"); @@ -95,7 +92,7 @@ class SyncTest: public CxxTest::TestSuite barrier_t * barrier = &(my->barrier); mutex_lock(mutex); - for(int i = 0; i < 100000; ++i); + nanosleep(0,TEN_CTX_SWITCHES_NS); TS_TRACE("ME FIRST"); mutex_unlock(mutex); barrier_wait(barrier); |