summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxhdrs
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-05-23 18:08:15 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-05-23 18:08:15 +0000
commit9854e336054fe015f292cf7d18b639123a2e9dd3 (patch)
treec2ee104c56c8ea04bfe1a07036ea38d7d397501e /testsuites/psxtests/psxhdrs
parentupdates from Tony Bennett (diff)
downloadrtems-9854e336054fe015f292cf7d18b639123a2e9dd3.tar.bz2
updated to reflect more constants and feature macros
Diffstat (limited to 'testsuites/psxtests/psxhdrs')
-rw-r--r--testsuites/psxtests/psxhdrs/cond01.c4
-rw-r--r--testsuites/psxtests/psxhdrs/cond02.c4
-rw-r--r--testsuites/psxtests/psxhdrs/cond03.c4
-rw-r--r--testsuites/psxtests/psxhdrs/cond04.c4
-rw-r--r--testsuites/psxtests/psxhdrs/cond05.c4
-rw-r--r--testsuites/psxtests/psxhdrs/cond06.c4
-rw-r--r--testsuites/psxtests/psxhdrs/cond07.c4
-rw-r--r--testsuites/psxtests/psxhdrs/key01.c4
-rw-r--r--testsuites/psxtests/psxhdrs/key02.c4
-rw-r--r--testsuites/psxtests/psxhdrs/key03.c4
-rw-r--r--testsuites/psxtests/psxhdrs/mutex01.c4
-rw-r--r--testsuites/psxtests/psxhdrs/mutex02.c4
-rw-r--r--testsuites/psxtests/psxhdrs/mutex03.c4
-rw-r--r--testsuites/psxtests/psxhdrs/mutex04.c6
-rw-r--r--testsuites/psxtests/psxhdrs/mutex05.c4
-rw-r--r--testsuites/psxtests/psxhdrs/mutex06.c4
-rw-r--r--testsuites/psxtests/psxhdrs/mutex07.c7
-rw-r--r--testsuites/psxtests/psxhdrs/mutex08.c7
-rw-r--r--testsuites/psxtests/psxhdrs/mutex09.c7
-rw-r--r--testsuites/psxtests/psxhdrs/pthread01.c4
-rw-r--r--testsuites/psxtests/psxhdrs/pthread02.c4
-rw-r--r--testsuites/psxtests/psxhdrs/pthread03.c4
-rw-r--r--testsuites/psxtests/psxhdrs/pthread04.c4
-rw-r--r--testsuites/psxtests/psxhdrs/pthread05.c8
-rw-r--r--testsuites/psxtests/psxhdrs/pthread06.c8
-rw-r--r--testsuites/psxtests/psxhdrs/pthread07.c4
-rw-r--r--testsuites/psxtests/psxhdrs/pthread08.c4
-rw-r--r--testsuites/psxtests/psxhdrs/pthread09.c3
-rw-r--r--testsuites/psxtests/psxhdrs/pthread10.c4
-rw-r--r--testsuites/psxtests/psxhdrs/pthread13.c8
-rw-r--r--testsuites/psxtests/psxhdrs/pthread21.c4
-rw-r--r--testsuites/psxtests/psxhdrs/signal06.c11
-rw-r--r--testsuites/psxtests/psxhdrs/signal07.c4
-rw-r--r--testsuites/psxtests/psxhdrs/signal08.c4
34 files changed, 160 insertions, 5 deletions
diff --git a/testsuites/psxtests/psxhdrs/cond01.c b/testsuites/psxtests/psxhdrs/cond01.c
index c6e83db5f2..a63cdae1a6 100644
--- a/testsuites/psxtests/psxhdrs/cond01.c
+++ b/testsuites/psxtests/psxhdrs/cond01.c
@@ -14,6 +14,10 @@
*/
#include <pthread.h>
+
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_condattr_init"
+#endif
void test( void )
{
diff --git a/testsuites/psxtests/psxhdrs/cond02.c b/testsuites/psxtests/psxhdrs/cond02.c
index 89dd770d34..8d36b5da9e 100644
--- a/testsuites/psxtests/psxhdrs/cond02.c
+++ b/testsuites/psxtests/psxhdrs/cond02.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_condattr_destroy"
+#endif
+
void test( void )
{
int result;
diff --git a/testsuites/psxtests/psxhdrs/cond03.c b/testsuites/psxtests/psxhdrs/cond03.c
index ea0f635f1a..01f393f160 100644
--- a/testsuites/psxtests/psxhdrs/cond03.c
+++ b/testsuites/psxtests/psxhdrs/cond03.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_cond_init"
+#endif
+
void test( void )
{
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
diff --git a/testsuites/psxtests/psxhdrs/cond04.c b/testsuites/psxtests/psxhdrs/cond04.c
index 1261b5aab3..d02ae7b54a 100644
--- a/testsuites/psxtests/psxhdrs/cond04.c
+++ b/testsuites/psxtests/psxhdrs/cond04.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_cond_destroy"
+#endif
+
void test( void )
{
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
diff --git a/testsuites/psxtests/psxhdrs/cond05.c b/testsuites/psxtests/psxhdrs/cond05.c
index a4ab9fa007..86eb9a1cd1 100644
--- a/testsuites/psxtests/psxhdrs/cond05.c
+++ b/testsuites/psxtests/psxhdrs/cond05.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_cond_signal"
+#endif
+
void test( void )
{
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
diff --git a/testsuites/psxtests/psxhdrs/cond06.c b/testsuites/psxtests/psxhdrs/cond06.c
index d92fe9e291..893ed45ba2 100644
--- a/testsuites/psxtests/psxhdrs/cond06.c
+++ b/testsuites/psxtests/psxhdrs/cond06.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_cond_wait"
+#endif
+
void test( void )
{
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
diff --git a/testsuites/psxtests/psxhdrs/cond07.c b/testsuites/psxtests/psxhdrs/cond07.c
index 829c2065e0..358645882a 100644
--- a/testsuites/psxtests/psxhdrs/cond07.c
+++ b/testsuites/psxtests/psxhdrs/cond07.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_cond_timedwait"
+#endif
+
void test( void )
{
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
diff --git a/testsuites/psxtests/psxhdrs/key01.c b/testsuites/psxtests/psxhdrs/key01.c
index a91f756fe6..e5b7f226c1 100644
--- a/testsuites/psxtests/psxhdrs/key01.c
+++ b/testsuites/psxtests/psxhdrs/key01.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_key_create"
+#endif
+
void key_destructor(
void *argument
)
diff --git a/testsuites/psxtests/psxhdrs/key02.c b/testsuites/psxtests/psxhdrs/key02.c
index 78d3ab0741..7c5c7ac240 100644
--- a/testsuites/psxtests/psxhdrs/key02.c
+++ b/testsuites/psxtests/psxhdrs/key02.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_setspecific"
+#endif
+
void test( void )
{
pthread_key_t key;
diff --git a/testsuites/psxtests/psxhdrs/key03.c b/testsuites/psxtests/psxhdrs/key03.c
index f3d0c9bd38..a105a8135e 100644
--- a/testsuites/psxtests/psxhdrs/key03.c
+++ b/testsuites/psxtests/psxhdrs/key03.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_getspecific"
+#endif
+
void test( void )
{
pthread_key_t key;
diff --git a/testsuites/psxtests/psxhdrs/mutex01.c b/testsuites/psxtests/psxhdrs/mutex01.c
index 5c8ab93797..6f9a3128c7 100644
--- a/testsuites/psxtests/psxhdrs/mutex01.c
+++ b/testsuites/psxtests/psxhdrs/mutex01.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_mutexattr_init"
+#endif
+
void test( void )
{
int result;
diff --git a/testsuites/psxtests/psxhdrs/mutex02.c b/testsuites/psxtests/psxhdrs/mutex02.c
index 91a6adcc03..d011007a47 100644
--- a/testsuites/psxtests/psxhdrs/mutex02.c
+++ b/testsuites/psxtests/psxhdrs/mutex02.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_mutexattr_destroy"
+#endif
+
void test( void )
{
int result;
diff --git a/testsuites/psxtests/psxhdrs/mutex03.c b/testsuites/psxtests/psxhdrs/mutex03.c
index 01950381cb..6ca68ea73f 100644
--- a/testsuites/psxtests/psxhdrs/mutex03.c
+++ b/testsuites/psxtests/psxhdrs/mutex03.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_mutex_init"
+#endif
+
void test( void )
{
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
diff --git a/testsuites/psxtests/psxhdrs/mutex04.c b/testsuites/psxtests/psxhdrs/mutex04.c
index 2a7c17e4d4..b0ef6c53a6 100644
--- a/testsuites/psxtests/psxhdrs/mutex04.c
+++ b/testsuites/psxtests/psxhdrs/mutex04.c
@@ -15,9 +15,13 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_mutex_destroy"
+#endif
+
void test( void )
{
- pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+ pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
int result;
result = pthread_mutex_destroy( &mutex );
diff --git a/testsuites/psxtests/psxhdrs/mutex05.c b/testsuites/psxtests/psxhdrs/mutex05.c
index afb1111a19..9a02accc97 100644
--- a/testsuites/psxtests/psxhdrs/mutex05.c
+++ b/testsuites/psxtests/psxhdrs/mutex05.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_mutex_lock"
+#endif
+
void test( void )
{
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
diff --git a/testsuites/psxtests/psxhdrs/mutex06.c b/testsuites/psxtests/psxhdrs/mutex06.c
index a21659445a..fab42b1b2b 100644
--- a/testsuites/psxtests/psxhdrs/mutex06.c
+++ b/testsuites/psxtests/psxhdrs/mutex06.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_mutex_unlock"
+#endif
+
void test( void )
{
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
diff --git a/testsuites/psxtests/psxhdrs/mutex07.c b/testsuites/psxtests/psxhdrs/mutex07.c
index 3c372d52e6..c471f921b5 100644
--- a/testsuites/psxtests/psxhdrs/mutex07.c
+++ b/testsuites/psxtests/psxhdrs/mutex07.c
@@ -15,6 +15,13 @@
#include <pthread.h>
+#ifndef _POSIX_THREAD_PRIO_INHERIT
+#error "rtems is supposed to have pthread_mutexattr_setprotocol"
+#endif
+#ifndef _POSIX_THREAD_PRIO_PROTECT
+#error "rtems is supposed to have pthread_mutexattr_setprotocol"
+#endif
+
void test( void )
{
pthread_mutexattr_t attribute;
diff --git a/testsuites/psxtests/psxhdrs/mutex08.c b/testsuites/psxtests/psxhdrs/mutex08.c
index b831085c30..ecea0c0fc0 100644
--- a/testsuites/psxtests/psxhdrs/mutex08.c
+++ b/testsuites/psxtests/psxhdrs/mutex08.c
@@ -15,6 +15,13 @@
#include <pthread.h>
+#ifndef _POSIX_THREAD_PRIO_INHERIT
+#error "rtems is supposed to have pthread_mutexattr_getprioceiling"
+#endif
+#ifndef _POSIX_THREAD_PRIO_PROTECT
+#error "rtems is supposed to have pthread_mutexattr_getprioceiling"
+#endif
+
void test( void )
{
pthread_mutexattr_t attribute;
diff --git a/testsuites/psxtests/psxhdrs/mutex09.c b/testsuites/psxtests/psxhdrs/mutex09.c
index 32861dbef7..cf5d8403a7 100644
--- a/testsuites/psxtests/psxhdrs/mutex09.c
+++ b/testsuites/psxtests/psxhdrs/mutex09.c
@@ -15,6 +15,13 @@
#include <pthread.h>
+#ifndef _POSIX_THREAD_PRIO_INHERIT
+#error "rtems is supposed to have pthread_mutexattr_setprioceiling"
+#endif
+#ifndef _POSIX_THREAD_PRIO_PROTECT
+#error "rtems is supposed to have pthread_mutexattr_setprioceiling"
+#endif
+
void test( void )
{
pthread_mutexattr_t attribute;
diff --git a/testsuites/psxtests/psxhdrs/pthread01.c b/testsuites/psxtests/psxhdrs/pthread01.c
index d98cc5ae49..16b450ca1a 100644
--- a/testsuites/psxtests/psxhdrs/pthread01.c
+++ b/testsuites/psxtests/psxhdrs/pthread01.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_attr_init"
+#endif
+
void test( void )
{
int result;
diff --git a/testsuites/psxtests/psxhdrs/pthread02.c b/testsuites/psxtests/psxhdrs/pthread02.c
index 8d2728b28c..f46253fdea 100644
--- a/testsuites/psxtests/psxhdrs/pthread02.c
+++ b/testsuites/psxtests/psxhdrs/pthread02.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_attr_destroy"
+#endif
+
void test( void )
{
int result;
diff --git a/testsuites/psxtests/psxhdrs/pthread03.c b/testsuites/psxtests/psxhdrs/pthread03.c
index 8a557c6f07..94ce5d80b8 100644
--- a/testsuites/psxtests/psxhdrs/pthread03.c
+++ b/testsuites/psxtests/psxhdrs/pthread03.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_attr_setdetachstate"
+#endif
+
void test( void )
{
int result;
diff --git a/testsuites/psxtests/psxhdrs/pthread04.c b/testsuites/psxtests/psxhdrs/pthread04.c
index a286e47252..8880b457bc 100644
--- a/testsuites/psxtests/psxhdrs/pthread04.c
+++ b/testsuites/psxtests/psxhdrs/pthread04.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_attr_getdetachstate"
+#endif
+
void test( void )
{
int result;
diff --git a/testsuites/psxtests/psxhdrs/pthread05.c b/testsuites/psxtests/psxhdrs/pthread05.c
index f4fcd56bb2..1736b55c94 100644
--- a/testsuites/psxtests/psxhdrs/pthread05.c
+++ b/testsuites/psxtests/psxhdrs/pthread05.c
@@ -16,6 +16,14 @@
#include <pthread.h>
#include <limits.h> /* only for PTHREAD_STACK_MIN */
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_setstacksize"
+#endif
+
+#ifndef _POSIX_THREAD_ATTR_STACKSIZE
+#error "rtems is supposed to have pthread_setstacksize"
+#endif
+
void test( void )
{
int result;
diff --git a/testsuites/psxtests/psxhdrs/pthread06.c b/testsuites/psxtests/psxhdrs/pthread06.c
index 3ea6292837..bbcc6a0de3 100644
--- a/testsuites/psxtests/psxhdrs/pthread06.c
+++ b/testsuites/psxtests/psxhdrs/pthread06.c
@@ -15,6 +15,14 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_getstacksize"
+#endif
+
+#ifndef _POSIX_THREAD_ATTR_STACKSIZE
+#error "rtems is supposed to have pthread_getstacksize"
+#endif
+
void test( void )
{
int result;
diff --git a/testsuites/psxtests/psxhdrs/pthread07.c b/testsuites/psxtests/psxhdrs/pthread07.c
index b15627ad2b..07709980f1 100644
--- a/testsuites/psxtests/psxhdrs/pthread07.c
+++ b/testsuites/psxtests/psxhdrs/pthread07.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_create"
+#endif
+
void *test_task(
void * arg
)
diff --git a/testsuites/psxtests/psxhdrs/pthread08.c b/testsuites/psxtests/psxhdrs/pthread08.c
index 2b3492e314..e843a234d6 100644
--- a/testsuites/psxtests/psxhdrs/pthread08.c
+++ b/testsuites/psxtests/psxhdrs/pthread08.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_exit"
+#endif
+
void test( void )
{
void *status = NULL;
diff --git a/testsuites/psxtests/psxhdrs/pthread09.c b/testsuites/psxtests/psxhdrs/pthread09.c
index 2679cc7f7d..2674ea9087 100644
--- a/testsuites/psxtests/psxhdrs/pthread09.c
+++ b/testsuites/psxtests/psxhdrs/pthread09.c
@@ -15,6 +15,9 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_self"
+#endif
void test( void )
{
diff --git a/testsuites/psxtests/psxhdrs/pthread10.c b/testsuites/psxtests/psxhdrs/pthread10.c
index 97d86ae278..32396cff8e 100644
--- a/testsuites/psxtests/psxhdrs/pthread10.c
+++ b/testsuites/psxtests/psxhdrs/pthread10.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_equal"
+#endif
+
void test( void )
{
pthread_t id_1 = 0;
diff --git a/testsuites/psxtests/psxhdrs/pthread13.c b/testsuites/psxtests/psxhdrs/pthread13.c
index 94433203ef..23747f41ab 100644
--- a/testsuites/psxtests/psxhdrs/pthread13.c
+++ b/testsuites/psxtests/psxhdrs/pthread13.c
@@ -22,11 +22,11 @@
void test( void )
{
pthread_attr_t attr;
- int contentsionscope;
+ int contentionscope;
int status;
- contentsionscope = PTHREAD_SCOPE_SYSTEM;
- contentsionscope = PTHREAD_SCOPE_PROCESS;
+ contentionscope = PTHREAD_SCOPE_SYSTEM;
+ contentionscope = PTHREAD_SCOPE_PROCESS;
- status = pthread_attr_setscope( &attr, contentsionscope );
+ status = pthread_attr_setscope( &attr, contentionscope );
}
diff --git a/testsuites/psxtests/psxhdrs/pthread21.c b/testsuites/psxtests/psxhdrs/pthread21.c
index 53cec0ca73..6bf46247f5 100644
--- a/testsuites/psxtests/psxhdrs/pthread21.c
+++ b/testsuites/psxtests/psxhdrs/pthread21.c
@@ -15,6 +15,10 @@
#include <pthread.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_detach"
+#endif
+
void test( void )
{
pthread_t thread;
diff --git a/testsuites/psxtests/psxhdrs/signal06.c b/testsuites/psxtests/psxhdrs/signal06.c
index ea02a2bdd1..d4738c52b7 100644
--- a/testsuites/psxtests/psxhdrs/signal06.c
+++ b/testsuites/psxtests/psxhdrs/signal06.c
@@ -24,5 +24,16 @@ void test( void )
signal_number = SIGALRM;
+ /*
+ * Really should not reference sa_handler and sa_signction simultaneously.
+ */
+
+ act.sa_handler = SIG_DFL;
+ act.sa_handler = SIG_IGN;
+ act.sa_mask = 0;
+ act.sa_flags = SA_NOCLDSTOP;
+ act.sa_flags = SA_SIGINFO;
+ act.sa_sigaction = NULL;
+
result = sigaction( signal_number, &act, &oact );
}
diff --git a/testsuites/psxtests/psxhdrs/signal07.c b/testsuites/psxtests/psxhdrs/signal07.c
index cc7a103a33..3949a18751 100644
--- a/testsuites/psxtests/psxhdrs/signal07.c
+++ b/testsuites/psxtests/psxhdrs/signal07.c
@@ -15,6 +15,10 @@
#include <signal.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_kill"
+#endif
+
void test( void )
{
pthread_t thread;
diff --git a/testsuites/psxtests/psxhdrs/signal08.c b/testsuites/psxtests/psxhdrs/signal08.c
index 5d9f48515d..b283797cd5 100644
--- a/testsuites/psxtests/psxhdrs/signal08.c
+++ b/testsuites/psxtests/psxhdrs/signal08.c
@@ -15,6 +15,10 @@
#include <signal.h>
+#ifndef _POSIX_THREADS
+#error "rtems is supposed to have pthread_sigmask"
+#endif
+
void test( void )
{
int how;