summaryrefslogtreecommitdiff
path: root/tests/benchtest5.c
diff options
context:
space:
mode:
authorrpj <rpj>2003-09-18 02:31:39 +0000
committerrpj <rpj>2003-09-18 02:31:39 +0000
commitaf1871fba4fc253b5a31e4a0eed667fe79f534d7 (patch)
tree1242599d7334ae50c5c05f9b23b52876e4287924 /tests/benchtest5.c
parentfac679912b15dd89cafdb09bf873d7eacc80a05e (diff)
Cleanup and fixes to thread priority management. Other minor changes.snap-2003-09-18
Diffstat (limited to 'tests/benchtest5.c')
-rw-r--r--tests/benchtest5.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/tests/benchtest5.c b/tests/benchtest5.c
index 11ad444..122fcb4 100644
--- a/tests/benchtest5.c
+++ b/tests/benchtest5.c
@@ -56,6 +56,8 @@ struct _timeb currSysTimeStart;
struct _timeb currSysTimeStop;
long durationMilliSecs;
long overHeadMilliSecs = 0;
+int one = 1;
+int zero = 0;
#define GetDurationMilliSecs(_TStart, _TStop) ((_TStop.time*1000+_TStop.millitm) \
- (_TStart.time*1000+_TStart.millitm))
@@ -100,7 +102,7 @@ main (int argc, char *argv[])
*/
TESTSTART
- assert(1 == 1);
+ assert(1 == one);
TESTSTOP
durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;
@@ -112,7 +114,7 @@ main (int argc, char *argv[])
*/
assert(sem_init(&sema, 0, 0) == 0);
TESTSTART
- assert(sem_post(&sema) == 0);
+ assert(sem_post(&sema) == zero);
TESTSTOP
assert(sem_destroy(&sema) == 0);
@@ -121,7 +123,7 @@ main (int argc, char *argv[])
assert(sem_init(&sema, 0, ITERATIONS) == 0);
TESTSTART
- assert(sem_wait(&sema) == 0);
+ assert(sem_wait(&sema) == zero);
TESTSTOP
assert(sem_destroy(&sema) == 0);
@@ -133,8 +135,8 @@ main (int argc, char *argv[])
*/
TESTSTART
- assert(1 == 1);
- assert(1 == 1);
+ assert(1 == one);
+ assert(1 == one);
TESTSTOP
durationMilliSecs = GetDurationMilliSecs(currSysTimeStart, currSysTimeStop) - overHeadMilliSecs;
@@ -146,8 +148,8 @@ main (int argc, char *argv[])
*/
assert(sem_init(&sema, 0, 0) == 0);
TESTSTART
- assert(sem_post(&sema) == 0);
- assert(sem_wait(&sema) == 0);
+ assert(sem_post(&sema) == zero);
+ assert(sem_wait(&sema) == zero);
TESTSTOP
assert(sem_destroy(&sema) == 0);
@@ -156,8 +158,8 @@ main (int argc, char *argv[])
assert(sem_init(&sema, 0, 1) == 0);
TESTSTART
- assert(sem_wait(&sema) == 0);
- assert(sem_post(&sema) == 0);
+ assert(sem_wait(&sema) == zero);
+ assert(sem_post(&sema) == zero);
TESTSTOP
assert(sem_destroy(&sema) == 0);