1 /*
2  * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
3  *
4  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
5  */
6 /*
7  * Never include this file directly; use <unistd.h> instead.
8  */
9 
10 #ifndef	_BITS_UCLIBC_LOCAL_LIM_H
11 #define	_BITS_UCLIBC_LOCAL_LIM_H	1
12 
13 /* This file works correctly only if local_lim.h is the NPTL version */
14 #if !defined PTHREAD_KEYS_MAX || defined TIMER_MAX || !defined SEM_VALUE_MAX
15 # error local_lim.h was incorrectly updated, use the NPTL version from glibc
16 #endif
17 
18 /* This should really be moved to thread specific directories */
19 #if defined __UCLIBC_HAS_THREADS__ && !defined __UCLIBC_HAS_THREADS_NATIVE__
20 /* glibc uses 16384 */
21 # define PTHREAD_THREADS_MAX	1024
22 # define TIMER_MAX		256
23 # ifdef __LINUXTHREADS_OLD__
24 #  undef SEM_VALUE_MAX
25 #  define SEM_VALUE_MAX	((int) ((~0u) >> 1))
26 # endif
27 # undef PTHREAD_STACK_MIN
28 /* glibc uses at least 16364 */
29 # define PTHREAD_STACK_MIN	1024
30 #endif
31 
32 #ifndef __UCLIBC_HAS_THREADS__
33 # undef _POSIX_THREAD_KEYS_MAX
34 # undef PTHREAD_KEYS_MAX
35 # undef _POSIX_THREAD_DESTRUCTOR_ITERATIONS
36 # undef PTHREAD_DESTRUCTOR_ITERATIONS
37 # undef PTHREAD_STACK_MIN
38 # undef DELAYTIMER_MAX
39 # undef SEM_VALUE_MAX
40 #endif
41 
42 #endif /* bits/uClibc_local_lim.h */
43