forked from Imagelibrary/rtems
2011-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* psxhdrs/pthread01.c, psxhdrs/pthread02.c, psxhdrs/pthread03.c, psxhdrs/pthread04.c, psxhdrs/pthread05.c, psxhdrs/pthread06.c, psxhdrs/pthread07.c, psxhdrs/pthread09.c, psxhdrs/pthread10.c, psxhdrs/pthread11.c, psxhdrs/pthread12.c, psxhdrs/pthread13.c, psxhdrs/pthread14.c, psxhdrs/pthread15.c, psxhdrs/pthread16.c, psxhdrs/pthread17.c, psxhdrs/pthread18.c, psxhdrs/pthread19.c, psxhdrs/pthread20.c, psxhdrs/pthread21.c, psxhdrs/pthread22.c, psxhdrs/pthread23.c, psxhdrs/pthread24.c, psxhdrs/pthread25.c, psxhdrs/pthread26.c, psxhdrs/pthread27.c, psxhdrs/pthread28.c, psxhdrs/pthread29.c, psxhdrs/pthread30.c, psxhdrs/pthread34.c, psxhdrs/pthread35.c, psxhdrs/pthread36.c, psxhdrs/pthread37.c, psxhdrs/pthread38.c, psxhdrs/pthread39.c, psxhdrs/pthread40.c: Let test() return values (avoid warnings).
This commit is contained in:
@@ -1,3 +1,19 @@
|
||||
2011-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* psxhdrs/pthread01.c, psxhdrs/pthread02.c, psxhdrs/pthread03.c,
|
||||
psxhdrs/pthread04.c, psxhdrs/pthread05.c, psxhdrs/pthread06.c,
|
||||
psxhdrs/pthread07.c, psxhdrs/pthread09.c, psxhdrs/pthread10.c,
|
||||
psxhdrs/pthread11.c, psxhdrs/pthread12.c, psxhdrs/pthread13.c,
|
||||
psxhdrs/pthread14.c, psxhdrs/pthread15.c, psxhdrs/pthread16.c,
|
||||
psxhdrs/pthread17.c, psxhdrs/pthread18.c, psxhdrs/pthread19.c,
|
||||
psxhdrs/pthread20.c, psxhdrs/pthread21.c, psxhdrs/pthread22.c,
|
||||
psxhdrs/pthread23.c, psxhdrs/pthread24.c, psxhdrs/pthread25.c,
|
||||
psxhdrs/pthread26.c, psxhdrs/pthread27.c, psxhdrs/pthread28.c,
|
||||
psxhdrs/pthread29.c, psxhdrs/pthread30.c, psxhdrs/pthread34.c,
|
||||
psxhdrs/pthread35.c, psxhdrs/pthread36.c, psxhdrs/pthread37.c,
|
||||
psxhdrs/pthread38.c, psxhdrs/pthread39.c, psxhdrs/pthread40.c:
|
||||
Let test() return values (avoid warnings).
|
||||
|
||||
2011-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* psxhdrs/cond01.c, psxhdrs/cond02.c, psxhdrs/cond03.c,
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
#error "rtems is supposed to have pthread_attr_init"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_init( &attribute );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
#error "rtems is supposed to have pthread_attr_destroy"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_destroy( &attribute );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#error "rtems is supposed to have pthread_attr_setdetachstate"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
int state;
|
||||
@@ -34,4 +34,6 @@ void test( void )
|
||||
state = PTHREAD_CREATE_JOINABLE;
|
||||
|
||||
result = pthread_attr_setdetachstate( &attribute, state );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,13 +22,15 @@
|
||||
#error "rtems is supposed to have pthread_attr_getdetachstate"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
int state;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getdetachstate( &attribute, &state );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
#error "rtems is supposed to have pthread_setstacksize"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
size_t size;
|
||||
@@ -38,4 +38,6 @@ void test( void )
|
||||
size = PTHREAD_STACK_MIN;
|
||||
|
||||
result = pthread_attr_setstacksize( &attribute, size );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -26,13 +26,15 @@
|
||||
#error "rtems is supposed to have pthread_getstacksize"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
size_t size;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getstacksize( &attribute, &size );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#error "rtems is supposed to have pthread_create"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
void *test_task( void * arg );
|
||||
|
||||
void *test_task(
|
||||
@@ -34,7 +34,7 @@ void *test_task(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
pthread_attr_t attribute;
|
||||
@@ -42,4 +42,6 @@ void test( void )
|
||||
int result;
|
||||
|
||||
result = pthread_create( &thread, &attribute, test_task, arg );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,11 +22,13 @@
|
||||
#error "rtems is supposed to have pthread_self"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_t self;
|
||||
|
||||
self = pthread_self();
|
||||
|
||||
return ( self != 0 );
|
||||
}
|
||||
|
||||
@@ -22,13 +22,15 @@
|
||||
#error "rtems is supposed to have pthread_equal"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_t id_1 = 0;
|
||||
pthread_t id_2 = 0;
|
||||
int result;
|
||||
|
||||
result = pthread_equal( id_1, id_2 );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#error "RTEMS is supposed to have pthread_setschedparam"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
int policy;
|
||||
@@ -54,4 +54,6 @@ void test( void )
|
||||
#endif
|
||||
|
||||
result = pthread_setschedparam( thread, policy, ¶m );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#error "RTEMS is supposed to have pthread_getschedparam"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
int policy;
|
||||
@@ -34,4 +34,6 @@ void test( void )
|
||||
thread = 0;
|
||||
|
||||
result = pthread_getschedparam( thread, &policy, ¶m );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#error "RTEMS is supposed to have pthread_attr_setscope"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int contentionscope;
|
||||
@@ -34,4 +34,6 @@ void test( void )
|
||||
contentionscope = PTHREAD_SCOPE_PROCESS;
|
||||
|
||||
result = pthread_attr_setscope( &attr, contentionscope );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,13 +22,15 @@
|
||||
#error "RTEMS is supposed to have pthread_attr_getscope"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int contentionscope;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getscope( &attr, &contentionscope );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#error "RTEMS is supposed to have pthread_attr_setinheritsched"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int inheritsched;
|
||||
@@ -34,4 +34,6 @@ void test( void )
|
||||
inheritsched = PTHREAD_EXPLICIT_SCHED;
|
||||
|
||||
result = pthread_attr_setinheritsched( &attr, inheritsched );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,13 +22,15 @@
|
||||
#error "RTEMS is supposed to have pthread_attr_getinheritsched"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int inheritsched;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getinheritsched( &attr, &inheritsched );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#error "RTEMS is supposed to have pthread_attr_setschedpolicy"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int policy;
|
||||
@@ -38,4 +38,6 @@ void test( void )
|
||||
#endif
|
||||
|
||||
result = pthread_attr_setschedpolicy( &attr, policy );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,13 +22,15 @@
|
||||
#error "RTEMS is supposed to have pthread_attr_getschedpolicy"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int policy;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getschedpolicy( &attr, &policy );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,13 +22,15 @@
|
||||
#error "RTEMS is supposed to have pthread_attr_setschedparam"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
struct sched_param param;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_setschedparam( &attr, ¶m );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,13 +22,15 @@
|
||||
#error "RTEMS is supposed to have pthread_attr_getschedparam"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
struct sched_param param;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getschedparam( &attr, ¶m );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,13 +22,15 @@
|
||||
#error "rtems is supposed to have pthread_detach"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
int result;
|
||||
|
||||
thread = 0;
|
||||
result = pthread_detach( thread );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#error "RTEMS is supposed to have pthread_setschedparam"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_t thread = 0;
|
||||
int policy;
|
||||
@@ -52,4 +52,6 @@ void test( void )
|
||||
#endif
|
||||
|
||||
result = pthread_setschedparam( thread, policy, ¶m );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#error "RTEMS is supposed to have pthread_getschedparam"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_t thread = 0;
|
||||
int policy;
|
||||
@@ -32,4 +32,6 @@ void test( void )
|
||||
int result;
|
||||
|
||||
result = pthread_getschedparam( thread, &policy, ¶m );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
#error "rtems is supposed to have pthread_setstackaddr"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
void *stackaddr;
|
||||
@@ -38,4 +38,6 @@ void test( void )
|
||||
stackaddr = NULL;
|
||||
|
||||
result = pthread_attr_setstackaddr( &attribute, stackaddr );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -27,13 +27,15 @@
|
||||
#error "rtems is supposed to have pthread_getstackaddr"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
void *stackaddr;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getstackaddr( &attribute, &stackaddr );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#error "rtems is supposed to have pthread_join"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
void *value_ptr;
|
||||
@@ -33,4 +33,6 @@ void test( void )
|
||||
thread = 0;
|
||||
|
||||
result = pthread_join( thread, &value_ptr );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,17 +22,19 @@
|
||||
#error "rtems is supposed to have pthread_once"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
void init_routine( void );
|
||||
|
||||
void init_routine( void )
|
||||
{
|
||||
}
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_once_t once_control = PTHREAD_ONCE_INIT;
|
||||
int result;
|
||||
|
||||
result = pthread_once( &once_control, init_routine );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,18 +22,20 @@
|
||||
#error "rtems is supposed to have pthread_cancel"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
void init_routine( void );
|
||||
|
||||
void init_routine( void )
|
||||
{
|
||||
}
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
int result;
|
||||
|
||||
thread = 0;
|
||||
result = pthread_cancel( thread );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
#error "rtems is supposed to have pthread_setcancelstate"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
void init_routine( void );
|
||||
|
||||
void init_routine( void )
|
||||
{
|
||||
}
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
int state;
|
||||
int oldstate;
|
||||
@@ -39,4 +39,6 @@ void test( void )
|
||||
state = PTHREAD_CANCEL_DISABLE;
|
||||
|
||||
result = pthread_setcancelstate( state, &oldstate );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
#error "rtems is supposed to have pthread_setcanceltype"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
void init_routine( void );
|
||||
|
||||
void init_routine( void )
|
||||
{
|
||||
}
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
int type;
|
||||
int oldtype;
|
||||
@@ -39,4 +39,6 @@ void test( void )
|
||||
type = PTHREAD_CANCEL_ASYNCHRONOUS;
|
||||
|
||||
result = pthread_setcanceltype( type, &oldtype );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
#error "rtems is supposed to have pthread_getcpuclockid"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_t thread;
|
||||
clockid_t clock_id;
|
||||
@@ -33,4 +33,6 @@ void test( void )
|
||||
thread = 0;
|
||||
|
||||
result = pthread_getcpuclockid( thread, &clock_id );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@ extern int pthread_attr_setcputime(
|
||||
#error "rtems is supposed to have pthread_attr_setcputime"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int clock_allowed;
|
||||
@@ -40,4 +40,6 @@ void test( void )
|
||||
clock_allowed = CLOCK_DISALLOWED;
|
||||
|
||||
result = pthread_attr_setcputime( &attr, clock_allowed );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -28,13 +28,15 @@ extern int pthread_attr_getcputime(
|
||||
#error "rtems is supposed to have pthread_attr_getcputime"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attr;
|
||||
int clock_allowed;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getcputime( &attr, &clock_allowed );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
#error "rtems is supposed to have pthread_setstackaddr"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
void *stackaddr;
|
||||
@@ -41,5 +41,7 @@ void test( void )
|
||||
stacksize = 1024;
|
||||
|
||||
result = pthread_attr_setstack( &attribute, stackaddr, stacksize );
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
#error "rtems is supposed to have pthread_getstackaddr"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
void *stackaddr;
|
||||
@@ -38,5 +38,7 @@ void test( void )
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getstack( &attribute, &stackaddr, &stacksize );
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
#error "rtems is supposed to have pthread_setstacksize"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
size_t size;
|
||||
@@ -35,5 +35,7 @@ void test( void )
|
||||
size = PTHREAD_STACK_MIN;
|
||||
|
||||
result = pthread_attr_setguardsize( &attribute, size );
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -23,14 +23,16 @@
|
||||
#error "rtems is supposed to have pthread_getstacksize"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_attr_t attribute;
|
||||
size_t size;
|
||||
int result;
|
||||
|
||||
result = pthread_attr_getguardsize( &attribute, &size );
|
||||
|
||||
return result;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user