summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx04
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-11 01:41:16 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-11 01:41:16 +0000
commit2e7e636f7568558b7f3508ffd5acce55161668ef (patch)
treefec2e364c3df8bd689e794e82309c650584e5376 /testsuites/psxtests/psx04
parent2009-05-10 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-2e7e636f7568558b7f3508ffd5acce55161668ef.tar.bz2
2009-05-10 Joel Sherrill <joel.sherrill@oarcorp.com>
* psx01/init.c, psx01/task.c, psx02/init.c, psx02/task.c, psx03/init.c, psx04/init.c, psx04/task1.c, psx04/task3.c, psx05/init.c, psx06/init.c, psx07/init.c, psx08/init.c, psx09/init.c, psx11/task.c, psx12/init.c, psx13/main.c, psx13/test.c, psxbarrier01/test.c, psxcancel/init.c, psxcleanup/psxcleanup.c, psxenosys/init.c, psxmsgq02/init.c, psxtime/main.c, psxtime/test.c, psxtimer01/psxtimer.c, psxtimer02/psxtimer.c: Fix warnings.
Diffstat (limited to 'testsuites/psxtests/psx04')
-rw-r--r--testsuites/psxtests/psx04/init.c27
-rw-r--r--testsuites/psxtests/psx04/task1.c4
-rw-r--r--testsuites/psxtests/psx04/task3.c5
3 files changed, 22 insertions, 14 deletions
diff --git a/testsuites/psxtests/psx04/init.c b/testsuites/psxtests/psx04/init.c
index 98a9cd3dd4..54c7b5bb05 100644
--- a/testsuites/psxtests/psx04/init.c
+++ b/testsuites/psxtests/psx04/init.c
@@ -1,5 +1,5 @@
/*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -16,6 +16,12 @@
volatile int Signal_occurred;
volatile int Signal_count;
+void Signal_handler( int signo );
+void Signal_info_handler(
+ int signo,
+ siginfo_t *info,
+ void *context
+);
void Signal_handler(
int signo
@@ -54,6 +60,7 @@ void *POSIX_Init(
void *argument
)
{
+ unsigned int remaining;
int status;
struct sigaction act;
sigset_t mask;
@@ -198,7 +205,7 @@ void *POSIX_Init(
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
puts( "Init: sleep so the other task can block" );
- status = sleep( 1 );
+ remaining = sleep( 1 );
assert( !status );
/* switch to task 1 */
@@ -212,7 +219,7 @@ void *POSIX_Init(
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
puts( "Init: sleep so the other task can catch signal" );
- status = sleep( 1 );
+ remaining = sleep( 1 );
assert( !status );
/* switch to task 1 */
@@ -244,17 +251,17 @@ void *POSIX_Init(
/* schedule the alarm */
puts( "Init: Firing alarm in 5 seconds" );
- status = alarm( 5 );
+ remaining = alarm( 5 );
printf( "Init: %d seconds left on previous alarm\n", status );
assert( !status );
puts( "Init: Firing alarm in 2 seconds" );
- status = alarm( 2 );
+ remaining = alarm( 2 );
printf( "Init: %d seconds left on previous alarm\n", status );
assert( status );
puts( "Init: Wait 4 seconds for alarm" );
- status = sleep( 4 );
+ remaining = sleep( 4 );
printf( "Init: %d seconds left in sleep\n", status );
assert( status );
@@ -324,7 +331,7 @@ void *POSIX_Init(
sigaction( SIGUSR1, &act, NULL );
puts( "Init: sleep so the Task_3 can sigqueue SIGUSR1" );
- status = sleep( 1 );
+ remaining = sleep( 1 );
assert( !status );
/* switch to task 1 */
@@ -348,7 +355,7 @@ void *POSIX_Init(
assert( !status );
puts( "Init: sleep so the Task_3 can receive SIGUSR1" );
- status = sleep( 1 );
+ remaining = sleep( 1 );
assert( !status );
/* Send SIGUSR1, Task_3 has issued a sigwait */
@@ -368,7 +375,7 @@ void *POSIX_Init(
assert( !status );
puts( "Init: sleep so the Task_3 can receive SIGUSR1" );
- status = sleep( 1 );
+ remaining = sleep( 1 );
assert( !status );
/* Send SIGUSR1, Task_3 has issued a sigwaitinfo */
@@ -388,7 +395,7 @@ void *POSIX_Init(
assert( !status );
puts( "Init: sleep so the Task_3 can receive SIGUSR2" );
- status = sleep( 1 );
+ remaining = sleep( 1 );
assert( !status );
/* Suspend for signal that has already be sent */
diff --git a/testsuites/psxtests/psx04/task1.c b/testsuites/psxtests/psx04/task1.c
index 930f3cb777..046ece1476 100644
--- a/testsuites/psxtests/psx04/task1.c
+++ b/testsuites/psxtests/psx04/task1.c
@@ -7,7 +7,7 @@
*
* Output parameters: NONE
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -24,7 +24,7 @@ void *Task_1(
void *argument
)
{
- int seconds;
+ unsigned int seconds;
printf( "Task_1: sleeping for 5 seconds\n" );
diff --git a/testsuites/psxtests/psx04/task3.c b/testsuites/psxtests/psx04/task3.c
index 5870e91272..8f3990ef31 100644
--- a/testsuites/psxtests/psx04/task3.c
+++ b/testsuites/psxtests/psx04/task3.c
@@ -7,7 +7,7 @@
*
* Output parameters: NONE
*
- * COPYRIGHT (c) 1989-1999.
+ * COPYRIGHT (c) 1989-2009.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
@@ -24,6 +24,7 @@ void *Task_3(
void *argument
)
{
+ unsigned int remaining;
int status;
int sig;
union sigval value;
@@ -105,7 +106,7 @@ void *Task_3(
assert( !status );
printf( "Task_3: sleep so the Init task can reguest a signal\n" );
- status = sleep( 1 );
+ remaining = sleep( 1 );
assert( !status );
/* end of task 3 */