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:
Ralf Corsepius
2011-10-17 11:17:11 +00:00
parent 4f609eec67
commit 38cc8d5385
17 changed files with 73 additions and 32 deletions
+9
View File
@@ -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,
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}
+4 -2
View File
@@ -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;
}