updated to reflect more constants and feature macros

This commit is contained in:
Joel Sherrill
1996-05-23 18:08:15 +00:00
parent 8b2ecf8546
commit 9854e33605
68 changed files with 320 additions and 10 deletions

View File

@@ -14,6 +14,10 @@
*/
#include <pthread.h>
#ifndef _POSIX_THREADS
#error "rtems is supposed to have pthread_condattr_init"
#endif
void test( void )
{

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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
)

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 );

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -15,6 +15,10 @@
#include <pthread.h>
#ifndef _POSIX_THREADS
#error "rtems is supposed to have pthread_create"
#endif
void *test_task(
void * arg
)

View File

@@ -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;

View File

@@ -15,6 +15,9 @@
#include <pthread.h>
#ifndef _POSIX_THREADS
#error "rtems is supposed to have pthread_self"
#endif
void test( void )
{

View File

@@ -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;

View File

@@ -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 );
}

View File

@@ -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;

View File

@@ -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 );
}

View File

@@ -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;

View File

@@ -15,6 +15,10 @@
#include <signal.h>
#ifndef _POSIX_THREADS
#error "rtems is supposed to have pthread_sigmask"
#endif
void test( void )
{
int how;

View File

@@ -14,6 +14,10 @@
*/
#include <pthread.h>
#ifndef _POSIX_THREADS
#error "rtems is supposed to have pthread_condattr_init"
#endif
void test( void )
{

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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
)

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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 );

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -15,6 +15,10 @@
#include <pthread.h>
#ifndef _POSIX_THREADS
#error "rtems is supposed to have pthread_create"
#endif
void *test_task(
void * arg
)

View File

@@ -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;

View File

@@ -15,6 +15,9 @@
#include <pthread.h>
#ifndef _POSIX_THREADS
#error "rtems is supposed to have pthread_self"
#endif
void test( void )
{

View File

@@ -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;

View File

@@ -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 );
}

View File

@@ -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;

View File

@@ -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 );
}

View File

@@ -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;

View File

@@ -15,6 +15,10 @@
#include <signal.h>
#ifndef _POSIX_THREADS
#error "rtems is supposed to have pthread_sigmask"
#endif
void test( void )
{
int how;