From 95645a45e274754c134f1426b26fe14fb3910e37 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 4 Jun 1996 19:06:30 +0000 Subject: added test case for sched_get_priority_min, sched_get_priority_max, and sched_rr_get_interval. --- testsuites/psxtests/psx01/init.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'testsuites/psxtests/psx01') diff --git a/testsuites/psxtests/psx01/init.c b/testsuites/psxtests/psx01/init.c index 5a3d387802..a7c5bf69bd 100644 --- a/testsuites/psxtests/psx01/init.c +++ b/testsuites/psxtests/psx01/init.c @@ -49,6 +49,7 @@ void *POSIX_Init( ) { int status; + int priority; pthread_t thread_id; time_t seconds; time_t remaining; @@ -118,6 +119,28 @@ void *POSIX_Init( Init_id = pthread_self(); printf( "Init's ID is 0x%08x\n", Init_id ); + /* print the minimum priority */ + + priority = sched_get_priority_min( SCHED_FIFO ); + printf( "Minimum priority for FIFO is %d\n", priority ); + assert( priority != -1 ); + + /* print the maximum priority */ + + priority = sched_get_priority_max( SCHED_FIFO ); + printf( "Maximum priority for FIFO is %d\n", priority ); + assert( priority != -1 ); + + /* print the round robin time quantum */ + + status = sched_rr_get_interval( getpid(), &tr ); + printf( + "Round Robin quantum is %d seconds, %d nanoseconds\n", + tr.tv_sec, + tr.tv_nsec + ); + assert( !status ); + /* create a thread */ status = pthread_create( &thread_id, NULL, Task_1_through_3, NULL ); -- cgit v1.2.3