forked from Imagelibrary/rtems
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:
@@ -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>
|
2011-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
* psxhdrs/mutex01.c, psxhdrs/mutex02.c, psxhdrs/mutex03.c,
|
* psxhdrs/mutex01.c, psxhdrs/mutex02.c, psxhdrs/mutex03.c,
|
||||||
|
|||||||
@@ -22,12 +22,14 @@
|
|||||||
#error "rtems is supposed to have pthread_condattr_init"
|
#error "rtems is supposed to have pthread_condattr_init"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_condattr_t attribute;
|
pthread_condattr_t attribute;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = pthread_condattr_init( &attribute );
|
result = pthread_condattr_init( &attribute );
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,12 +22,14 @@
|
|||||||
#error "rtems is supposed to have pthread_condattr_destroy"
|
#error "rtems is supposed to have pthread_condattr_destroy"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_condattr_t attribute;
|
pthread_condattr_t attribute;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = pthread_condattr_destroy( &attribute );
|
result = pthread_condattr_destroy( &attribute );
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,13 +22,15 @@
|
|||||||
#error "rtems is supposed to have pthread_cond_init"
|
#error "rtems is supposed to have pthread_cond_init"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
pthread_condattr_t attribute;
|
pthread_condattr_t attribute;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = pthread_cond_init( &cond, &attribute );
|
result = pthread_cond_init( &cond, &attribute );
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,12 +22,14 @@
|
|||||||
#error "rtems is supposed to have pthread_cond_destroy"
|
#error "rtems is supposed to have pthread_cond_destroy"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = pthread_cond_destroy( &cond );
|
result = pthread_cond_destroy( &cond );
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,12 +22,14 @@
|
|||||||
#error "rtems is supposed to have pthread_cond_signal"
|
#error "rtems is supposed to have pthread_cond_signal"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = pthread_cond_signal( &cond );
|
result = pthread_cond_signal( &cond );
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,13 +22,15 @@
|
|||||||
#error "rtems is supposed to have pthread_cond_wait"
|
#error "rtems is supposed to have pthread_cond_wait"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = pthread_cond_wait( &cond, &mutex );
|
result = pthread_cond_wait( &cond, &mutex );
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
#error "rtems is supposed to have pthread_cond_timedwait"
|
#error "rtems is supposed to have pthread_cond_timedwait"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
@@ -32,4 +32,6 @@ void test( void )
|
|||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = pthread_cond_timedwait( &cond, &mutex, &abstime );
|
result = pthread_cond_timedwait( &cond, &mutex, &abstime );
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,13 +25,15 @@
|
|||||||
#error "rtems is supposed to have pthread_condattr_setpshared"
|
#error "rtems is supposed to have pthread_condattr_setpshared"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_condattr_t attribute;
|
pthread_condattr_t attribute;
|
||||||
int pshared;
|
int pshared;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = pthread_condattr_getpshared( &attribute, &pshared );
|
result = pthread_condattr_getpshared( &attribute, &pshared );
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,9 +25,9 @@
|
|||||||
#error "rtems is supposed to have pthread_condattr_setpshared"
|
#error "rtems is supposed to have pthread_condattr_setpshared"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_condattr_t attribute;
|
pthread_condattr_t attribute;
|
||||||
int pshared;
|
int pshared;
|
||||||
@@ -37,4 +37,6 @@ void test( void )
|
|||||||
pshared = PTHREAD_PROCESS_PRIVATE;
|
pshared = PTHREAD_PROCESS_PRIVATE;
|
||||||
|
|
||||||
result = pthread_condattr_setpshared( &attribute, pshared );
|
result = pthread_condattr_setpshared( &attribute, pshared );
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,12 +22,14 @@
|
|||||||
#error "rtems is supposed to have pthread_cond_broadcast"
|
#error "rtems is supposed to have pthread_cond_broadcast"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = pthread_cond_broadcast( &cond );
|
result = pthread_cond_broadcast( &cond );
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user