diff options
author | Yuji Mano <yuji.mano@am.sony.com> | 2009-06-02 16:22:32 -0700 |
---|---|---|
committer | Yuji Mano <yuji.mano@am.sony.com> | 2009-06-02 16:22:32 -0700 |
commit | 3cf9493d8cee65cea2901db2905ce89d91ce2f9b (patch) | |
tree | c0aafc035a9741419a18fc425d20b863c5d790b0 | |
parent | aa28cc081ee2ac6c98ab5b2ca039d9e855b80e1c (diff) | |
download | mars-src-3cf9493d8cee65cea2901db2905ce89d91ce2f9b.tar.gz |
tests: Update branch-1.1.3v1.1.3
-rw-r--r-- | tests/TST/TST_01_001/host.c | 5 | ||||
-rw-r--r-- | tests/TST/TST_02_001/host.c | 5 | ||||
-rw-r--r-- | tests/TST/TST_03_001/host.c | 5 | ||||
-rw-r--r-- | tests/TST/TST_04_001/host.c | 5 | ||||
-rw-r--r-- | tests/TST/TST_05_001/host.c | 5 | ||||
-rw-r--r-- | tests/TST/TST_06_001/host.c | 5 | ||||
-rw-r--r-- | tests/TST/TST_07_001/host.c | 5 | ||||
-rw-r--r-- | tests/include/host/mars_test.h | 9 |
8 files changed, 42 insertions, 2 deletions
diff --git a/tests/TST/TST_01_001/host.c b/tests/TST/TST_01_001/host.c index f5d62b2..0975af6 100644 --- a/tests/TST/TST_01_001/host.c +++ b/tests/TST/TST_01_001/host.c @@ -38,6 +38,11 @@ uint64_t mars_ea_memalign(size_t boundary, size_t size) return starve_memory ? 0 : mars_ptr_to_ea(memalign(boundary, size)); } +void mars_ea_free(uint64_t ea) +{ + free(mars_ea_to_ptr(ea)); +} + int main(void) { int ret; diff --git a/tests/TST/TST_02_001/host.c b/tests/TST/TST_02_001/host.c index e06917d..2db2147 100644 --- a/tests/TST/TST_02_001/host.c +++ b/tests/TST/TST_02_001/host.c @@ -39,6 +39,11 @@ uint64_t mars_ea_memalign(size_t boundary, size_t size) return starve_memory ? 0 : mars_ptr_to_ea(memalign(boundary, size)); } +void mars_ea_free(uint64_t ea) +{ + free(mars_ea_to_ptr(ea)); +} + int main(void) { int ret; diff --git a/tests/TST/TST_03_001/host.c b/tests/TST/TST_03_001/host.c index b1db03f..37dab10 100644 --- a/tests/TST/TST_03_001/host.c +++ b/tests/TST/TST_03_001/host.c @@ -41,6 +41,11 @@ uint64_t mars_ea_memalign(size_t boundary, size_t size) return starve_memory ? 0 : mars_ptr_to_ea(memalign(boundary, size)); } +void mars_ea_free(uint64_t ea) +{ + free(mars_ea_to_ptr(ea)); +} + int main(void) { int ret; diff --git a/tests/TST/TST_04_001/host.c b/tests/TST/TST_04_001/host.c index eee747b..a0cc416 100644 --- a/tests/TST/TST_04_001/host.c +++ b/tests/TST/TST_04_001/host.c @@ -38,6 +38,11 @@ uint64_t mars_ea_memalign(size_t boundary, size_t size) return starve_memory ? 0 : mars_ptr_to_ea(memalign(boundary, size)); } +void mars_ea_free(uint64_t ea) +{ + free(mars_ea_to_ptr(ea)); +} + int main(void) { int ret; diff --git a/tests/TST/TST_05_001/host.c b/tests/TST/TST_05_001/host.c index 48b1409..cb42b3e 100644 --- a/tests/TST/TST_05_001/host.c +++ b/tests/TST/TST_05_001/host.c @@ -38,6 +38,11 @@ uint64_t mars_ea_memalign(size_t boundary, size_t size) return starve_memory ? 0 : mars_ptr_to_ea(memalign(boundary, size)); } +void mars_ea_free(uint64_t ea) +{ + free(mars_ea_to_ptr(ea)); +} + int main(void) { int ret; diff --git a/tests/TST/TST_06_001/host.c b/tests/TST/TST_06_001/host.c index 1045f75..395d7c3 100644 --- a/tests/TST/TST_06_001/host.c +++ b/tests/TST/TST_06_001/host.c @@ -38,6 +38,11 @@ uint64_t mars_ea_memalign(size_t boundary, size_t size) return starve_memory ? 0 : mars_ptr_to_ea(memalign(boundary, size)); } +void mars_ea_free(uint64_t ea) +{ + free(mars_ea_to_ptr(ea)); +} + int main(void) { int ret; diff --git a/tests/TST/TST_07_001/host.c b/tests/TST/TST_07_001/host.c index 2cd7895..836f74c 100644 --- a/tests/TST/TST_07_001/host.c +++ b/tests/TST/TST_07_001/host.c @@ -38,6 +38,11 @@ uint64_t mars_ea_memalign(size_t boundary, size_t size) return starve_memory ? 0 : mars_ptr_to_ea(memalign(boundary, size)); } +void mars_ea_free(uint64_t ea) +{ + free(mars_ea_to_ptr(ea)); +} + int main(void) { int ret; diff --git a/tests/include/host/mars_test.h b/tests/include/host/mars_test.h index fc434c0..d701817 100644 --- a/tests/include/host/mars_test.h +++ b/tests/include/host/mars_test.h @@ -76,7 +76,12 @@ static inline uint32_t mars_test_counter_add(uint32_t *ptr, int32_t diff) do { cur = mars_test_lwarx(ptr); cur += diff; - } while (!mars_test_stwcx(ptr, cur)); + + if (mars_test_stwcx(ptr, cur)) + break; + + usleep(100); + } while (1); return cur; } @@ -84,7 +89,7 @@ static inline uint32_t mars_test_counter_add(uint32_t *ptr, int32_t diff) static inline void mars_test_counter_wait(uint32_t *ptr, uint32_t val) { while (*ptr != val) - usleep(1); + usleep(100); } static inline int mars_test_get_timebase_freq(uint32_t *timebase_freq) |