forked from Imagelibrary/rtems
updated to reflect more constants and feature macros
This commit is contained in:
@@ -14,6 +14,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_condattr_init"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_condattr_destroy"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_cond_init"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_cond_destroy"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_cond_signal"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_cond_wait"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_cond_timedwait"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_key_create"
|
||||||
|
#endif
|
||||||
|
|
||||||
void key_destructor(
|
void key_destructor(
|
||||||
void *argument
|
void *argument
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_setspecific"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_key_t key;
|
pthread_key_t key;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_getspecific"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_key_t key;
|
pthread_key_t key;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_mutexattr_init"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_mutexattr_destroy"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_mutex_init"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|||||||
@@ -15,9 +15,13 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_mutex_destroy"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = pthread_mutex_destroy( &mutex );
|
result = pthread_mutex_destroy( &mutex );
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_mutex_lock"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_mutex_unlock"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,13 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#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 )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutexattr_t attribute;
|
pthread_mutexattr_t attribute;
|
||||||
|
|||||||
@@ -15,6 +15,13 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#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 )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutexattr_t attribute;
|
pthread_mutexattr_t attribute;
|
||||||
|
|||||||
@@ -15,6 +15,13 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#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 )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutexattr_t attribute;
|
pthread_mutexattr_t attribute;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_attr_init"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_attr_destroy"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_attr_setdetachstate"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_attr_getdetachstate"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -16,6 +16,14 @@
|
|||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <limits.h> /* only for PTHREAD_STACK_MIN */
|
#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 )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,14 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#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 )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_create"
|
||||||
|
#endif
|
||||||
|
|
||||||
void *test_task(
|
void *test_task(
|
||||||
void * arg
|
void * arg
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_exit"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
void *status = NULL;
|
void *status = NULL;
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_self"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_equal"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_t id_1 = 0;
|
pthread_t id_1 = 0;
|
||||||
|
|||||||
@@ -22,11 +22,11 @@
|
|||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
int contentsionscope;
|
int contentionscope;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
contentsionscope = PTHREAD_SCOPE_SYSTEM;
|
contentionscope = PTHREAD_SCOPE_SYSTEM;
|
||||||
contentsionscope = PTHREAD_SCOPE_PROCESS;
|
contentionscope = PTHREAD_SCOPE_PROCESS;
|
||||||
|
|
||||||
status = pthread_attr_setscope( &attr, contentsionscope );
|
status = pthread_attr_setscope( &attr, contentionscope );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_detach"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
|
|||||||
@@ -24,5 +24,16 @@ void test( void )
|
|||||||
|
|
||||||
signal_number = SIGALRM;
|
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 );
|
result = sigaction( signal_number, &act, &oact );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_kill"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_sigmask"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int how;
|
int how;
|
||||||
|
|||||||
@@ -14,6 +14,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_condattr_init"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_condattr_destroy"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_cond_init"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_cond_destroy"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_cond_signal"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_cond_wait"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_cond_timedwait"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_key_create"
|
||||||
|
#endif
|
||||||
|
|
||||||
void key_destructor(
|
void key_destructor(
|
||||||
void *argument
|
void *argument
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_setspecific"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_key_t key;
|
pthread_key_t key;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_getspecific"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_key_t key;
|
pthread_key_t key;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_mutexattr_init"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_mutexattr_destroy"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_mutex_init"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|||||||
@@ -15,9 +15,13 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_mutex_destroy"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
result = pthread_mutex_destroy( &mutex );
|
result = pthread_mutex_destroy( &mutex );
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_mutex_lock"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_mutex_unlock"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|||||||
@@ -15,6 +15,13 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#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 )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutexattr_t attribute;
|
pthread_mutexattr_t attribute;
|
||||||
|
|||||||
@@ -15,6 +15,13 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#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 )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutexattr_t attribute;
|
pthread_mutexattr_t attribute;
|
||||||
|
|||||||
@@ -15,6 +15,13 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#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 )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_mutexattr_t attribute;
|
pthread_mutexattr_t attribute;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_attr_init"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_attr_destroy"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_attr_setdetachstate"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_attr_getdetachstate"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -16,6 +16,14 @@
|
|||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <limits.h> /* only for PTHREAD_STACK_MIN */
|
#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 )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,14 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#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 )
|
void test( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_create"
|
||||||
|
#endif
|
||||||
|
|
||||||
void *test_task(
|
void *test_task(
|
||||||
void * arg
|
void * arg
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_exit"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
void *status = NULL;
|
void *status = NULL;
|
||||||
|
|||||||
@@ -15,6 +15,9 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_self"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_equal"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_t id_1 = 0;
|
pthread_t id_1 = 0;
|
||||||
|
|||||||
@@ -22,11 +22,11 @@
|
|||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_attr_t attr;
|
pthread_attr_t attr;
|
||||||
int contentsionscope;
|
int contentionscope;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
contentsionscope = PTHREAD_SCOPE_SYSTEM;
|
contentionscope = PTHREAD_SCOPE_SYSTEM;
|
||||||
contentsionscope = PTHREAD_SCOPE_PROCESS;
|
contentionscope = PTHREAD_SCOPE_PROCESS;
|
||||||
|
|
||||||
status = pthread_attr_setscope( &attr, contentsionscope );
|
status = pthread_attr_setscope( &attr, contentionscope );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_detach"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
|
|||||||
@@ -24,5 +24,16 @@ void test( void )
|
|||||||
|
|
||||||
signal_number = SIGALRM;
|
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 );
|
result = sigaction( signal_number, &act, &oact );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_kill"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
pthread_t thread;
|
pthread_t thread;
|
||||||
|
|||||||
@@ -15,6 +15,10 @@
|
|||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
#ifndef _POSIX_THREADS
|
||||||
|
#error "rtems is supposed to have pthread_sigmask"
|
||||||
|
#endif
|
||||||
|
|
||||||
void test( void )
|
void test( void )
|
||||||
{
|
{
|
||||||
int how;
|
int how;
|
||||||
|
|||||||
Reference in New Issue
Block a user