summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx01
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-04 19:06:30 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-04 19:06:30 +0000
commit95645a45e274754c134f1426b26fe14fb3910e37 (patch)
treec0d59fc4750e82fa49521dff5d67dabbcebf2a55 /testsuites/psxtests/psx01
parentchanged sched_rr_get_interval to use the interval to timespec routine. (diff)
downloadrtems-95645a45e274754c134f1426b26fe14fb3910e37.tar.bz2
added test case for sched_get_priority_min, sched_get_priority_max,
and sched_rr_get_interval.
Diffstat (limited to 'testsuites/psxtests/psx01')
-rw-r--r--testsuites/psxtests/psx01/init.c23
1 files changed, 23 insertions, 0 deletions
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 );