mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-26 18:13:36 +08:00
2011-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* psxhdrs/mutex01.c, psxhdrs/mutex02.c, psxhdrs/mutex03.c, psxhdrs/mutex04.c, psxhdrs/mutex05.c, psxhdrs/mutex06.c, psxhdrs/mutex07.c, psxhdrs/mutex08.c, psxhdrs/mutex09.c, psxhdrs/mutex10.c, psxhdrs/mutex11.c, psxhdrs/mutex12.c, psxhdrs/mutex13.c, psxhdrs/mutex14.c, psxhdrs/mutex15.c, psxhdrs/mutex16.c: Let test() return values (avoid warnings).
This commit is contained in:
@@ -1,3 +1,12 @@
|
||||
2011-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* psxhdrs/mutex01.c, psxhdrs/mutex02.c, psxhdrs/mutex03.c,
|
||||
psxhdrs/mutex04.c, psxhdrs/mutex05.c, psxhdrs/mutex06.c,
|
||||
psxhdrs/mutex07.c, psxhdrs/mutex08.c, psxhdrs/mutex09.c,
|
||||
psxhdrs/mutex10.c, psxhdrs/mutex11.c, psxhdrs/mutex12.c,
|
||||
psxhdrs/mutex13.c, psxhdrs/mutex14.c, psxhdrs/mutex15.c,
|
||||
psxhdrs/mutex16.c: Let test() return values (avoid warnings).
|
||||
|
||||
2011-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* psxhdrs/proc01.c, psxhdrs/proc02.c, psxhdrs/proc03.c,
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
#error "rtems is supposed to have pthread_mutexattr_init"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int result;
|
||||
|
||||
result = pthread_mutexattr_init( &attribute );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
#error "rtems is supposed to have pthread_mutexattr_destroy"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int result;
|
||||
|
||||
result = pthread_mutexattr_destroy( &attribute );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,13 +22,15 @@
|
||||
#error "rtems is supposed to have pthread_mutex_init"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
pthread_mutexattr_t attribute;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_init( &mutex, &attribute );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
#error "rtems is supposed to have pthread_mutex_destroy"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_destroy( &mutex );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
#error "rtems is supposed to have pthread_mutex_lock"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_lock( &mutex );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
#error "rtems is supposed to have pthread_mutex_unlock"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_unlock( &mutex );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
#error "rtems is supposed to have pthread_mutexattr_setprotocol"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int protocol;
|
||||
@@ -38,4 +38,6 @@ void test( void )
|
||||
protocol = PTHREAD_PRIO_PROTECT;
|
||||
|
||||
result = pthread_mutexattr_setprotocol( &attribute, protocol );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -25,13 +25,15 @@
|
||||
#error "rtems is supposed to have pthread_mutexattr_getprioceiling"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int prioceiling = 0;
|
||||
int result;
|
||||
|
||||
result = pthread_mutexattr_getprioceiling( &attribute, &prioceiling );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -25,13 +25,15 @@
|
||||
#error "rtems is supposed to have pthread_mutexattr_setprioceiling"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int prioceiling = 0;
|
||||
int result;
|
||||
|
||||
result = pthread_mutexattr_setprioceiling( &attribute, prioceiling );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -25,13 +25,15 @@
|
||||
#error "rtems is supposed to have pthread_mutexattr_setpshared"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int pshared;
|
||||
int result;
|
||||
|
||||
result = pthread_mutexattr_getpshared( &attribute, &pshared );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
#error "rtems is supposed to have pthread_mutexattr_setpshared"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int pshared;
|
||||
@@ -37,4 +37,6 @@ void test( void )
|
||||
pshared = PTHREAD_PROCESS_PRIVATE;
|
||||
|
||||
result = pthread_mutexattr_setpshared( &attribute, pshared );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -22,12 +22,14 @@
|
||||
#error "rtems is supposed to have pthread_mutex_trylock"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_trylock( &mutex );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -25,13 +25,15 @@
|
||||
#error "rtems is supposed to have pthread_mutex_timedlock"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
struct timespec timeout;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_timedlock( &mutex, &timeout );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -25,13 +25,15 @@
|
||||
#error "rtems is supposed to have pthread_mutexattr_getprotocol"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutexattr_t attribute;
|
||||
int protocol;
|
||||
int result;
|
||||
|
||||
result = pthread_mutexattr_getprotocol( &attribute, &protocol );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -25,13 +25,15 @@
|
||||
#error "rtems is supposed to have pthread_mutex_getprioceiling"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutex_t mutex;
|
||||
int prioceiling;
|
||||
int result;
|
||||
|
||||
result = pthread_mutex_getprioceiling( &mutex, &prioceiling );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
#error "rtems is supposed to have pthread_mutex_setprioceiling"
|
||||
#endif
|
||||
|
||||
void test( void );
|
||||
int test( void );
|
||||
|
||||
void test( void )
|
||||
int test( void )
|
||||
{
|
||||
pthread_mutex_t mutex;
|
||||
int prioceiling;
|
||||
@@ -37,4 +37,6 @@ void test( void )
|
||||
prioceiling = 0;
|
||||
|
||||
result = pthread_mutex_setprioceiling( &mutex, prioceiling, &oldceiling );
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user