2011-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>

* psxhdrs/cond01.c, psxhdrs/cond02.c, psxhdrs/cond03.c,
	psxhdrs/cond04.c, psxhdrs/cond05.c, psxhdrs/cond06.c,
	psxhdrs/cond07.c, psxhdrs/cond08.c, psxhdrs/cond09.c,
	psxhdrs/cond10.c: Let test() return values (avoid warnings).
This commit is contained in:
Ralf Corsepius
2011-10-17 11:36:23 +00:00
parent 38cc8d5385
commit 9620b6189f
11 changed files with 47 additions and 20 deletions

View File

@@ -1,3 +1,10 @@
2011-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* psxhdrs/cond01.c, psxhdrs/cond02.c, psxhdrs/cond03.c,
psxhdrs/cond04.c, psxhdrs/cond05.c, psxhdrs/cond06.c,
psxhdrs/cond07.c, psxhdrs/cond08.c, psxhdrs/cond09.c,
psxhdrs/cond10.c: Let test() return values (avoid warnings).
2011-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* psxhdrs/mutex01.c, psxhdrs/mutex02.c, psxhdrs/mutex03.c,

View File

@@ -22,12 +22,14 @@
#error "rtems is supposed to have pthread_condattr_init"
#endif
void test( void );
int test( void );
void test( void )
int test( void )
{
pthread_condattr_t attribute;
int result;
result = pthread_condattr_init( &attribute );
return result;
}

View File

@@ -22,12 +22,14 @@
#error "rtems is supposed to have pthread_condattr_destroy"
#endif
void test( void );
int test( void );
void test( void )
int test( void )
{
pthread_condattr_t attribute;
int result;
result = pthread_condattr_destroy( &attribute );
return result;
}

View File

@@ -22,13 +22,15 @@
#error "rtems is supposed to have pthread_cond_init"
#endif
void test( void );
int test( void );
void test( void )
int test( void )
{
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
pthread_condattr_t attribute;
int result;
result = pthread_cond_init( &cond, &attribute );
return result;
}

View File

@@ -22,12 +22,14 @@
#error "rtems is supposed to have pthread_cond_destroy"
#endif
void test( void );
int test( void );
void test( void )
int test( void )
{
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
int result;
result = pthread_cond_destroy( &cond );
return result;
}

View File

@@ -22,12 +22,14 @@
#error "rtems is supposed to have pthread_cond_signal"
#endif
void test( void );
int test( void );
void test( void )
int test( void )
{
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
int result;
result = pthread_cond_signal( &cond );
return result;
}

View File

@@ -22,13 +22,15 @@
#error "rtems is supposed to have pthread_cond_wait"
#endif
void test( void );
int test( void );
void test( void )
int test( void )
{
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
int result;
result = pthread_cond_wait( &cond, &mutex );
return result;
}

View File

@@ -22,9 +22,9 @@
#error "rtems is supposed to have pthread_cond_timedwait"
#endif
void test( void );
int test( void );
void test( void )
int test( void )
{
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -32,4 +32,6 @@ void test( void )
int result;
result = pthread_cond_timedwait( &cond, &mutex, &abstime );
return result;
}

View File

@@ -25,13 +25,15 @@
#error "rtems is supposed to have pthread_condattr_setpshared"
#endif
void test( void );
int test( void );
void test( void )
int test( void )
{
pthread_condattr_t attribute;
int pshared;
int result;
result = pthread_condattr_getpshared( &attribute, &pshared );
return result;
}

View File

@@ -25,9 +25,9 @@
#error "rtems is supposed to have pthread_condattr_setpshared"
#endif
void test( void );
int test( void );
void test( void )
int test( void )
{
pthread_condattr_t attribute;
int pshared;
@@ -37,4 +37,6 @@ void test( void )
pshared = PTHREAD_PROCESS_PRIVATE;
result = pthread_condattr_setpshared( &attribute, pshared );
return result;
}

View File

@@ -22,12 +22,14 @@
#error "rtems is supposed to have pthread_cond_broadcast"
#endif
void test( void );
int test( void );
void test( void )
int test( void )
{
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
int result;
result = pthread_cond_broadcast( &cond );
return result;
}