summaryrefslogtreecommitdiff
path: root/tests/priority1.c
diff options
context:
space:
mode:
authorrpj <rpj>2004-05-20 00:56:52 +0000
committerrpj <rpj>2004-05-20 00:56:52 +0000
commitf4756d6ea3d806ecdf1a7d270c7cd9608cb18dfd (patch)
tree4ea5002a8237c1d9a704a46d1ca3bda9f2ae3b7a /tests/priority1.c
parent1d88ae3b57489e653d9b253fa5b760377ce62711 (diff)
Administrative fixes
Diffstat (limited to 'tests/priority1.c')
-rw-r--r--tests/priority1.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/priority1.c b/tests/priority1.c
index 1dc6ea7..c68e506 100644
--- a/tests/priority1.c
+++ b/tests/priority1.c
@@ -148,22 +148,24 @@ main()
PTW32TEST_THREAD_INIT_PRIO);
printf("Using pthread_getschedparam\n");
- printf("%10s %10s\n", "Set value", "Get value");
+ printf("%10s %10s %10s\n", "Set value", "Get value", "Win priority");
for (param.sched_priority = minPrio;
param.sched_priority <= maxPrio;
param.sched_priority++)
{
+ int prio;
+
assert(pthread_attr_setschedparam(&attr, &param) == 0);
assert(pthread_create(&t, &attr, func, (void *) &attr) == 0);
- assert(GetThreadPriority(pthread_getw32threadhandle_np(t))
+ assert((prio = GetThreadPriority(pthread_getw32threadhandle_np(t)))
== validPriorities[param.sched_priority+(PTW32TEST_MAXPRIORITIES/2)]);
assert(pthread_join(t, &result) == 0);
assert(param.sched_priority == (int) result);
- printf("%10d %10d\n", param.sched_priority, (int) result);
+ printf("%10d %10d %10d\n", param.sched_priority, (int) result, prio);
}
return 0;