diff --git a/c/src/exec/posix/base/limits.h b/c/src/exec/posix/base/limits.h index d46500bc36..e8ac4bf2fd 100644 --- a/c/src/exec/posix/base/limits.h +++ b/c/src/exec/posix/base/limits.h @@ -11,9 +11,14 @@ * $Id$ */ +#include_next + #ifndef __POSIX_LIMITS_h #define __POSIX_LIMITS_h +/* really only to get min stack size from */ +#include + /**************************************************************************** **************************************************************************** * * @@ -113,14 +118,19 @@ * minimum but is indeterminate. */ -#define LOGIN_NAME_MAX 9 -#define PTHREAD_DESTRUCTOR_ITERATIONS 4 +#define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX +#define TTY_NAME_MAX _POSIX_TTY_NAME_MAX +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS +#define PTHREAD_STACK_MIN CPU_STACK_MINIMUM_SIZE + /* * The maximum number of keys (PTHREAD_KEYS_MAX) and threads * (PTHREAD_THREADS_MAX) are configurable and may exceed the minimum. - */ + * +#define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX +#define PTHREAD_THREADS_MAX _POSIX_THREAD_THREADS_MAX +*/ -#define TTY_NAME_MAX 9 /**************************************************************************** **************************************************************************** diff --git a/c/src/exec/posix/base/pthread.h b/c/src/exec/posix/base/pthread.h index ea9680f3c4..3bc1c6dc07 100644 --- a/c/src/exec/posix/base/pthread.h +++ b/c/src/exec/posix/base/pthread.h @@ -6,7 +6,7 @@ #ifndef __PTHREAD_h #define __PTHREAD_h -#include +#include #if defined(_POSIX_THREADS) @@ -211,7 +211,7 @@ int pthread_attr_getschedpolicy( int pthread_attr_setschedparam( pthread_attr_t *attr, - const struct sched_param param + const struct sched_param *param ); int pthread_attr_getschedparam( @@ -342,10 +342,10 @@ int pthread_attr_setdetachstate( */ int pthread_create( - pthread_t *thread, - const pthread_attr_t *attr, - void (*start_routine)( void * ), - void *arg + pthread_t *thread, + const pthread_attr_t *attr, + void *(*start_routine)( void * ), + void *arg ); /* @@ -365,6 +365,14 @@ int pthread_detach( pthread_t thread ); +/* + * 16.1.5.1 Thread Termination, p1003.1c/Draft 10, p. 150 + */ + +void pthread_exit( + void *value_ptr +); + /* * 16.1.6 Get Calling Thread's ID, p1003.1c/Draft 10, p. XXX */ diff --git a/c/src/exec/posix/base/sched.h b/c/src/exec/posix/base/sched.h index 1ea27a1634..14a603c0c5 100644 --- a/c/src/exec/posix/base/sched.h +++ b/c/src/exec/posix/base/sched.h @@ -7,7 +7,7 @@ #ifndef __POSIX_SCHEDULING_h #define __POSIX_SCHEDULING_h -#include +#include #if defined(_POSIX_PRIORITY_SCHEDULING) diff --git a/c/src/exec/posix/include/limits.h b/c/src/exec/posix/include/limits.h index d46500bc36..e8ac4bf2fd 100644 --- a/c/src/exec/posix/include/limits.h +++ b/c/src/exec/posix/include/limits.h @@ -11,9 +11,14 @@ * $Id$ */ +#include_next + #ifndef __POSIX_LIMITS_h #define __POSIX_LIMITS_h +/* really only to get min stack size from */ +#include + /**************************************************************************** **************************************************************************** * * @@ -113,14 +118,19 @@ * minimum but is indeterminate. */ -#define LOGIN_NAME_MAX 9 -#define PTHREAD_DESTRUCTOR_ITERATIONS 4 +#define LOGIN_NAME_MAX _POSIX_LOGIN_NAME_MAX +#define TTY_NAME_MAX _POSIX_TTY_NAME_MAX +#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS +#define PTHREAD_STACK_MIN CPU_STACK_MINIMUM_SIZE + /* * The maximum number of keys (PTHREAD_KEYS_MAX) and threads * (PTHREAD_THREADS_MAX) are configurable and may exceed the minimum. - */ + * +#define PTHREAD_KEYS_MAX _POSIX_THREAD_KEYS_MAX +#define PTHREAD_THREADS_MAX _POSIX_THREAD_THREADS_MAX +*/ -#define TTY_NAME_MAX 9 /**************************************************************************** **************************************************************************** diff --git a/c/src/exec/posix/include/pthread.h b/c/src/exec/posix/include/pthread.h index ea9680f3c4..3bc1c6dc07 100644 --- a/c/src/exec/posix/include/pthread.h +++ b/c/src/exec/posix/include/pthread.h @@ -6,7 +6,7 @@ #ifndef __PTHREAD_h #define __PTHREAD_h -#include +#include #if defined(_POSIX_THREADS) @@ -211,7 +211,7 @@ int pthread_attr_getschedpolicy( int pthread_attr_setschedparam( pthread_attr_t *attr, - const struct sched_param param + const struct sched_param *param ); int pthread_attr_getschedparam( @@ -342,10 +342,10 @@ int pthread_attr_setdetachstate( */ int pthread_create( - pthread_t *thread, - const pthread_attr_t *attr, - void (*start_routine)( void * ), - void *arg + pthread_t *thread, + const pthread_attr_t *attr, + void *(*start_routine)( void * ), + void *arg ); /* @@ -365,6 +365,14 @@ int pthread_detach( pthread_t thread ); +/* + * 16.1.5.1 Thread Termination, p1003.1c/Draft 10, p. 150 + */ + +void pthread_exit( + void *value_ptr +); + /* * 16.1.6 Get Calling Thread's ID, p1003.1c/Draft 10, p. XXX */ diff --git a/c/src/exec/posix/include/sched.h b/c/src/exec/posix/include/sched.h index 1ea27a1634..14a603c0c5 100644 --- a/c/src/exec/posix/include/sched.h +++ b/c/src/exec/posix/include/sched.h @@ -7,7 +7,7 @@ #ifndef __POSIX_SCHEDULING_h #define __POSIX_SCHEDULING_h -#include +#include #if defined(_POSIX_PRIORITY_SCHEDULING) diff --git a/cpukit/posix/include/sched.h b/cpukit/posix/include/sched.h index 1ea27a1634..14a603c0c5 100644 --- a/cpukit/posix/include/sched.h +++ b/cpukit/posix/include/sched.h @@ -7,7 +7,7 @@ #ifndef __POSIX_SCHEDULING_h #define __POSIX_SCHEDULING_h -#include +#include #if defined(_POSIX_PRIORITY_SCHEDULING)