mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-11-16 12:34:45 +00:00
2003-05-29 Joel Sherrill <joel@OARcorp.com>
* psx02/init.c, psx04/init.c, psx13/test.c, psxchroot01/test.c, psxhdrs/pthread07.c, psxmsgq01/init.c, psxreaddir/test.c, psxtimer/psxtimer.c: Removed warnings.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2003-05-29 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* psx02/init.c, psx04/init.c, psx13/test.c, psxchroot01/test.c,
|
||||
psxhdrs/pthread07.c, psxmsgq01/init.c, psxreaddir/test.c,
|
||||
psxtimer/psxtimer.c: Removed warnings.
|
||||
|
||||
2003-05-27 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||
|
||||
* configure.ac: Remove CC_CFLAGS_DEBUG_V.
|
||||
|
||||
@@ -23,8 +23,8 @@ void Signal_handler(
|
||||
Signal_count++;
|
||||
printf(
|
||||
"Signal: %d caught by 0x%x (%d)\n",
|
||||
signo,
|
||||
pthread_self(),
|
||||
(int) signo,
|
||||
(unsigned int) pthread_self(),
|
||||
Signal_count
|
||||
);
|
||||
Signal_occurred = 1;
|
||||
@@ -86,7 +86,7 @@ void *POSIX_Init(
|
||||
|
||||
status = sigpending( &pending_set );
|
||||
assert( !status );
|
||||
printf( "Init: Signals pending 0x%08x\n", pending_set );
|
||||
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
|
||||
|
||||
|
||||
printf( "Init: send SIGUSR1 to self\n" );
|
||||
@@ -95,7 +95,7 @@ void *POSIX_Init(
|
||||
|
||||
status = sigpending( &pending_set );
|
||||
assert( !status );
|
||||
printf( "Init: Signals pending 0x%08x\n", pending_set );
|
||||
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
|
||||
|
||||
printf( "Init: Unblock SIGUSR1\n" );
|
||||
status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
|
||||
|
||||
@@ -77,19 +77,20 @@ void *POSIX_Init(
|
||||
|
||||
status = sigemptyset( &act.sa_mask );
|
||||
assert( !status );
|
||||
printf( "Init: sigemptyset - set= 0x%08x\n", act.sa_mask );
|
||||
printf( "Init: sigemptyset - set= 0x%08x\n", (unsigned int) act.sa_mask );
|
||||
|
||||
/* test sigfillset following the above sigemptyset */
|
||||
|
||||
status = sigfillset( &act.sa_mask );
|
||||
assert( !status );
|
||||
printf( "Init: sigfillset - set= 0x%08x\n", act.sa_mask );
|
||||
printf( "Init: sigfillset - set= 0x%08x\n", (unsigned int) act.sa_mask );
|
||||
|
||||
/* test sigdelset */
|
||||
|
||||
status = sigdelset( &act.sa_mask, SIGUSR1 );
|
||||
assert( !status );
|
||||
printf( "Init: sigdelset - delete SIGUSR1 set= 0x%08x\n", act.sa_mask );
|
||||
printf( "Init: sigdelset - delete SIGUSR1 set= 0x%08x\n",
|
||||
(unsigned int) act.sa_mask );
|
||||
|
||||
/* test sigismember - FALSE */
|
||||
|
||||
@@ -166,7 +167,7 @@ void *POSIX_Init(
|
||||
|
||||
status = sigpending( &pending_set );
|
||||
assert( !status );
|
||||
printf( "Init: Signals pending 0x%08x\n", pending_set );
|
||||
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
|
||||
|
||||
puts( "Init: send SIGUSR1 to process" );
|
||||
status = kill( getpid(), SIGUSR1 );
|
||||
@@ -174,7 +175,7 @@ void *POSIX_Init(
|
||||
|
||||
status = sigpending( &pending_set );
|
||||
assert( !status );
|
||||
printf( "Init: Signals pending 0x%08x\n", pending_set );
|
||||
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
|
||||
|
||||
puts( "Init: Unblock SIGUSR1" );
|
||||
status = sigprocmask( SIG_UNBLOCK, &mask, NULL );
|
||||
@@ -194,7 +195,7 @@ void *POSIX_Init(
|
||||
|
||||
status = sigpending( &pending_set );
|
||||
assert( !status );
|
||||
printf( "Init: Signals pending 0x%08x\n", pending_set );
|
||||
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
|
||||
|
||||
puts( "Init: sleep so the other task can block" );
|
||||
status = sleep( 1 );
|
||||
@@ -208,7 +209,7 @@ void *POSIX_Init(
|
||||
|
||||
status = sigpending( &pending_set );
|
||||
assert( !status );
|
||||
printf( "Init: Signals pending 0x%08x\n", pending_set );
|
||||
printf( "Init: Signals pending 0x%08x\n", (unsigned int) pending_set );
|
||||
|
||||
puts( "Init: sleep so the other task can catch signal" );
|
||||
status = sleep( 1 );
|
||||
@@ -272,13 +273,13 @@ void *POSIX_Init(
|
||||
|
||||
puts( "Init: Block SIGUSR1 and SIGUSR2 only" );
|
||||
status = pthread_sigmask( SIG_SETMASK, &mask, &oset );
|
||||
printf( "Init: Previous blocked set was 0x%08x\n", oset );
|
||||
printf( "Init: Previous blocked set was 0x%08x\n", (unsigned int) oset );
|
||||
assert( !status );
|
||||
|
||||
/* test inquiry about current blocked set with pthread_sigmask */
|
||||
|
||||
status = pthread_sigmask( 0, NULL, &oset );
|
||||
printf( "Init: Current blocked set is 0x%08x\n", oset );
|
||||
printf( "Init: Current blocked set is 0x%08x\n", (unsigned int) oset );
|
||||
assert( !status );
|
||||
|
||||
/* return blocked mask to no signals blocked */
|
||||
@@ -288,7 +289,7 @@ void *POSIX_Init(
|
||||
|
||||
puts( "Init: Unblock all signals" );
|
||||
status = pthread_sigmask( SIG_SETMASK, &mask, &oset );
|
||||
printf( "Init: Previous blocked set was 0x%08x\n", oset );
|
||||
printf( "Init: Previous blocked set was 0x%08x\n", (unsigned int) oset );
|
||||
assert( !status );
|
||||
|
||||
/* test sigsuspend */
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <utime.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <pmacros.h>
|
||||
|
||||
|
||||
@@ -66,10 +66,7 @@ int main(
|
||||
)
|
||||
#endif
|
||||
{
|
||||
int fd;
|
||||
int i;
|
||||
int status;
|
||||
struct stat s;
|
||||
|
||||
/*
|
||||
* This test is the C equivalent of this sequence.
|
||||
|
||||
@@ -24,6 +24,7 @@ void *test_task(
|
||||
{
|
||||
for ( ; ; )
|
||||
;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void test( void )
|
||||
|
||||
@@ -675,7 +675,9 @@ void validate_mq_receive_error_codes( )
|
||||
|
||||
void verify_open_functionality()
|
||||
{
|
||||
#if 0
|
||||
mqd_t n_mq;
|
||||
#endif
|
||||
|
||||
Start_Test( "mq_open functionality" );
|
||||
|
||||
@@ -765,7 +767,7 @@ void verify_timed_send_queue(
|
||||
fatal_posix_service_status( errno, ETIMEDOUT, "errno ETIMEDOUT");
|
||||
}
|
||||
|
||||
printf("Init: %d sec %d us\n", tv3.tv_sec, tv3.tv_usec );
|
||||
printf("Init: %ld sec %ld us\n", (long)tv3.tv_sec, (long)tv3.tv_usec );
|
||||
|
||||
if ( is_blocking ) /* non-blocking queue */
|
||||
assert( tv3.tv_sec == 1 );
|
||||
@@ -817,7 +819,7 @@ void verify_timed_receive_queue(
|
||||
fatal_int_service_status( status, -1, "mq_timedreceive status");
|
||||
if ( is_blocking )
|
||||
fatal_posix_service_status( errno, ETIMEDOUT, "errno ETIMEDOUT");
|
||||
printf( "Init: %d sec %d us\n", tv3.tv_sec, tv3.tv_usec );
|
||||
printf( "Init: %ld sec %ld us\n", (long)tv3.tv_sec, (long)tv3.tv_usec );
|
||||
|
||||
if ( is_blocking )
|
||||
assert( tv3.tv_sec == 1 );
|
||||
|
||||
@@ -156,7 +156,7 @@ int select2 ( struct dirent *entry )
|
||||
return 0;
|
||||
}
|
||||
|
||||
int compare_ascending( struct dirent **a, struct dirent **b )
|
||||
int compare_ascending(const struct dirent **a, const struct dirent **b )
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -180,7 +180,7 @@ int compare_descending( struct dirent **a, struct dirent **b )
|
||||
return i;
|
||||
}
|
||||
|
||||
int test_across_mount()
|
||||
void test_across_mount()
|
||||
{
|
||||
rtems_filesystem_mount_table_entry_t *mt_entry;
|
||||
int status;
|
||||
|
||||
@@ -95,7 +95,8 @@ void * task_a (void *arg)
|
||||
clock = time(NULL);
|
||||
printf("Executing task A %s", ctime(&clock));
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* task B */
|
||||
|
||||
@@ -152,6 +153,7 @@ void * task_b (void *arg)
|
||||
pthread_mutex_unlock (&data.mutex);
|
||||
x++;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* task C */
|
||||
@@ -209,7 +211,8 @@ void * task_c (void *arg)
|
||||
printf("Executing task C with x = %i %s", x, ctime(&clock));
|
||||
pthread_mutex_unlock (&data.mutex);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/* main */
|
||||
|
||||
Reference in New Issue
Block a user