forked from Imagelibrary/rtems
2011-10-15 Ralf Corsépius <ralf.corsepius@rtems.org>
* psxhdrs/key01.c, psxhdrs/key02.c, psxhdrs/key03.c, psxhdrs/key04.c: Let test() return values (avoid warnings).
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
2011-10-15 Ralf Corsépius <ralf.corsepius@rtems.org>
|
2011-10-15 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||||
|
|
||||||
|
* psxhdrs/key01.c, psxhdrs/key02.c, psxhdrs/key03.c,
|
||||||
|
psxhdrs/key04.c: Let test() return values (avoid warnings).
|
||||||
* psxhdrs/clock01.c, psxhdrs/clock02.c, psxhdrs/clock03.c,
|
* psxhdrs/clock01.c, psxhdrs/clock02.c, psxhdrs/clock03.c,
|
||||||
psxhdrs/clock04.c, psxhdrs/clock05.c, psxhdrs/clock06.c:
|
psxhdrs/clock04.c, psxhdrs/clock05.c, psxhdrs/clock06.c:
|
||||||
Let test() return values (avoid warnings).
|
Let test() return values (avoid warnings).
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#error "rtems is supposed to have pthread_key_create"
|
#error "rtems is supposed to have pthread_key_create"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
void key_destructor( void *argument );
|
void key_destructor( void *argument );
|
||||||
|
|
||||||
void key_destructor(
|
void key_destructor(
|
||||||
@@ -31,10 +31,12 @@ void key_destructor(
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_key_t key;
|
pthread_key_t key;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = pthread_key_create( &key, key_destructor );
|
result = pthread_key_create( &key, key_destructor );
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
#error "rtems is supposed to have pthread_setspecific"
|
#error "rtems is supposed to have pthread_setspecific"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_key_t key;
|
pthread_key_t key;
|
||||||
int value;
|
int value;
|
||||||
@@ -34,4 +34,6 @@ void test( void )
|
|||||||
value = 0;
|
value = 0;
|
||||||
|
|
||||||
result = pthread_setspecific( key, &value );
|
result = pthread_setspecific( key, &value );
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
#error "rtems is supposed to have pthread_getspecific"
|
#error "rtems is supposed to have pthread_getspecific"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_key_t key;
|
pthread_key_t key;
|
||||||
void *value;
|
void *value;
|
||||||
@@ -32,4 +32,6 @@ void test( void )
|
|||||||
key = 0;
|
key = 0;
|
||||||
|
|
||||||
value = pthread_getspecific( key );
|
value = pthread_getspecific( key );
|
||||||
|
|
||||||
|
return (value != 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,12 +22,14 @@
|
|||||||
#error "rtems is supposed to have pthread_key_delete"
|
#error "rtems is supposed to have pthread_key_delete"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void test( void );
|
int test( void );
|
||||||
|
|
||||||
void test( void )
|
int test( void )
|
||||||
{
|
{
|
||||||
pthread_key_t key = 0;
|
pthread_key_t key = 0;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = pthread_key_delete( key );
|
result = pthread_key_delete( key );
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user