summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxrwlock01
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2009-10-25 06:51:02 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2009-10-25 06:51:02 +0000
commitcd06fd586e9faade668ae03af69c6ffc966a63f9 (patch)
tree3d9478913a1624b06fe981954ded560ce52c6d16 /testsuites/psxtests/psxrwlock01
parent2009-10-25 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-cd06fd586e9faade668ae03af69c6ffc966a63f9.tar.bz2
2009-10-25 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Check for pthread_rwlock_unlock in pthread.h. * psxrwlock01/test.c: Conditionally add local prototype for pthread_rwlock_unlock() if pthread.h doesn't supply it.
Diffstat (limited to 'testsuites/psxtests/psxrwlock01')
-rw-r--r--testsuites/psxtests/psxrwlock01/test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxrwlock01/test.c b/testsuites/psxtests/psxrwlock01/test.c
index 11727c9e69..567d15d3da 100644
--- a/testsuites/psxtests/psxrwlock01/test.c
+++ b/testsuites/psxtests/psxrwlock01/test.c
@@ -19,6 +19,11 @@
/* #define __USE_XOPEN2K XXX already defined on GNU/Linux */
#include <pthread.h>
+#if !HAVE_DECL_PTHREAD_RWLOCK_UNLOCK
+/* FIXME: Newlib should provide the decl. */
+extern int pthread_rwlock_unlock(pthread_rwlock_t *rwlock);
+#endif
+
#define NUMBER_THREADS 2
pthread_t ThreadIds[NUMBER_THREADS];
pthread_rwlock_t RWLock;