* As requested by POSIX, we now have PTHREAD_STACK_MIN, and PTHREAD_KEYS_MAX

defined in limits.h.
* This closes ticket #2559.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26982 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-08-15 15:00:26 +00:00
parent c5e91552e1
commit 6dc27eba0c
4 changed files with 5 additions and 2 deletions

View File

@ -41,6 +41,8 @@
#define PAGESIZE (4096)
#define PATH_MAX (1024)
#define PIPE_MAX (512)
#define PTHREAD_KEYS_MAX 256
#define PTHREAD_STACK_MIN 4096
#define SSIZE_MAX (2147483647L)
#define TTY_NAME_MAX (256)
#define TZNAME_MAX (32)

View File

@ -8,6 +8,7 @@
#include <pthread.h>
#include "pthread_private.h"
#include <limits.h>
#include <stdlib.h>
#include <thread_defs.h>
@ -102,7 +103,7 @@ pthread_attr_setstacksize(pthread_attr_t *_attr, size_t stacksize)
if (_attr == NULL || (attr = *_attr) == NULL)
return B_BAD_VALUE;
if (stacksize < MIN_USER_STACK_SIZE || stacksize > MAX_USER_STACK_SIZE)
if (stacksize < PTHREAD_STACK_MIN || stacksize > MAX_USER_STACK_SIZE)
return B_BAD_VALUE;
attr->stack_size = stacksize;

View File

@ -6,6 +6,7 @@
#include "pthread_private.h"
#include <limits.h>
#include <stdlib.h>

View File

@ -47,7 +47,6 @@ struct pthread_key_data {
void *value;
};
#define PTHREAD_KEYS_MAX 256
#define PTHREAD_UNUSED_SEQUENCE 0
typedef struct _pthread_thread {