diff options
Diffstat (limited to 'tests/priority1.c')
-rw-r--r-- | tests/priority1.c | 8 |
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, ¶m) == 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; |