summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx11
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-04-16 09:24:30 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-04-16 09:24:30 +0000
commit1b4f2b305c95a832a259e4c4944f1a0981676eba (patch)
tree1ee56809b12a03ba53d630f5483a48387f72b74a /testsuites/psxtests/psx11
parentRemove stray white spaces. (diff)
downloadrtems-1b4f2b305c95a832a259e4c4944f1a0981676eba.tar.bz2
Remove stray white spaces.
Diffstat (limited to 'testsuites/psxtests/psx11')
-rw-r--r--testsuites/psxtests/psx11/init.c20
-rw-r--r--testsuites/psxtests/psx11/task.c14
2 files changed, 17 insertions, 17 deletions
diff --git a/testsuites/psxtests/psx11/init.c b/testsuites/psxtests/psx11/init.c
index 766e1df382..cbea072ae5 100644
--- a/testsuites/psxtests/psx11/init.c
+++ b/testsuites/psxtests/psx11/init.c
@@ -1,4 +1,4 @@
-/*
+/*
* COPYRIGHT (c) 1989-1999.
* On-Line Applications Research Corporation (OAR).
*
@@ -31,7 +31,7 @@ void *POSIX_Init(
Init_id = pthread_self();
printf( "Init's ID is 0x%08x\n", Init_id );
-
+
/* exercise pthread_setschedparam */
param.sched_priority = 127;
@@ -53,33 +53,33 @@ void *POSIX_Init(
assert( !status );
/* create a thread as SCHED_FIFO */
-
+
puts( "Init: create a thread of SCHED_FIFO with priority 120" );
status = pthread_attr_init( &attr );
assert( !status );
-
+
attr.schedpolicy = SCHED_FIFO;
attr.schedparam.sched_priority = 120;
-
+
status = pthread_create( &Task_id, &attr, Task_1, NULL );
assert( !status );
-
+
puts( "Init: join with the other thread" );
status = pthread_join( Task_id, NULL );
assert( !status );
/* create a thread as SCHED_RR */
-
+
puts( "Init: create a thread of SCHED_RR with priority 120" );
status = pthread_attr_init( &attr );
assert( !status );
-
+
attr.schedpolicy = SCHED_RR;
attr.schedparam.sched_priority = 120;
-
+
status = pthread_create( &Task_id, &attr, Task_1, NULL );
assert( !status );
-
+
puts( "Init: join with the other thread" );
status = pthread_join( Task_id, NULL );
assert( !status );
diff --git a/testsuites/psxtests/psx11/task.c b/testsuites/psxtests/psx11/task.c
index 29ee014870..020e686b64 100644
--- a/testsuites/psxtests/psx11/task.c
+++ b/testsuites/psxtests/psx11/task.c
@@ -29,14 +29,14 @@ void diff_timespec(
)
{
int nsecs_per_sec = 1000000000;
-
+
result->tv_sec = stop->tv_sec - start->tv_sec;
if ( stop->tv_nsec < start->tv_nsec ) {
result->tv_nsec = nsecs_per_sec - start->tv_nsec + stop->tv_nsec;
result->tv_sec--;
} else
result->tv_nsec = stop->tv_nsec - start->tv_nsec;
-
+
}
void *Task_1(
@@ -51,7 +51,7 @@ void *Task_1(
status = clock_gettime( CLOCK_REALTIME, &start );
assert( !status );
-
+
status = sched_rr_get_interval( getpid(), &delay );
assert( !status );
@@ -63,8 +63,8 @@ void *Task_1(
delay.tv_nsec -= 1000000000;
delay.tv_sec++;
}
-
-
+
+
puts( "Task_1: killing time" );
for ( ; ; ) {
@@ -78,10 +78,10 @@ void *Task_1(
if ( difference.tv_sec > delay.tv_sec )
break;
-
+
if ( difference.tv_nsec > delay.tv_nsec )
break;
-
+
}
puts( "Task_1: exitting" );