[git commit] local_lim.h: add NPTL version for alpha, ia64, powerpc, sparc, update common

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Jun 15 12:00:23 UTC 2012


commit: http://git.uclibc.org/uClibc/commit/?id=d5332f2fdd01396faf8cd6f925cca3916024a96f
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master

avoid the possibility to use the wrong bits/local_lim.h
uClibc_local_lim.h fix it be correct for LT

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 .../linux/{common => alpha}/bits/local_lim.h       |   27 +++++++++-----------
 libc/sysdeps/linux/common/bits/local_lim.h         |    5 +++
 libc/sysdeps/linux/common/bits/uClibc_local_lim.h  |    8 +++++-
 .../linux/{common => ia64}/bits/local_lim.h        |   17 ++++++++----
 .../linux/{common => powerpc}/bits/local_lim.h     |   15 ++++++++---
 .../linux/{common => sparc}/bits/local_lim.h       |   17 ++++++++----
 6 files changed, 57 insertions(+), 32 deletions(-)

diff --git a/libc/sysdeps/linux/common/bits/local_lim.h b/libc/sysdeps/linux/alpha/bits/local_lim.h
similarity index 80%
copy from libc/sysdeps/linux/common/bits/local_lim.h
copy to libc/sysdeps/linux/alpha/bits/local_lim.h
index a263b5d..9b27b1f 100644
--- a/libc/sysdeps/linux/common/bits/local_lim.h
+++ b/libc/sysdeps/linux/alpha/bits/local_lim.h
@@ -1,18 +1,18 @@
-/* Minimum guaranteed maximum values for system limits.  Linux version.
-   Copyright (C) 1993-1998,2000,2002-2004,2008 Free Software Foundation, Inc.
+/* Minimum guaranteed maximum values for system limits.  Linux/Alpha version.
+   Copyright (C) 1993-1998,2000,2002,2003,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License as
-   published by the Free Software Foundation; either version 2.1 of the
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
    License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
+   Library General Public License for more details.
 
-   You should have received a copy of the GNU Lesser General Public
+   You should have received a copy of the GNU Library General Public
    License along with the GNU C Library; see the file COPYING.LIB.  If not,
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
@@ -31,9 +31,6 @@
 #ifndef OPEN_MAX
 # define __undef_OPEN_MAX
 #endif
-#ifndef ARG_MAX
-# define __undef_ARG_MAX
-#endif
 
 /* The kernel sources contain a file with all the needed information.  */
 #include <linux/limits.h>
@@ -53,11 +50,6 @@
 # undef OPEN_MAX
 # undef __undef_OPEN_MAX
 #endif
-/* Have to remove ARG_MAX?  */
-#ifdef __undef_ARG_MAX
-# undef ARG_MAX
-# undef __undef_ARG_MAX
-#endif
 
 /* The number of data keys per process.  */
 #define _POSIX_THREAD_KEYS_MAX	128
@@ -71,13 +63,15 @@
 
 /* The number of threads per process.  */
 #define _POSIX_THREAD_THREADS_MAX	64
+/* We have no predefined limit on the number of threads.  */
+#undef PTHREAD_THREADS_MAX
 
 /* Maximum amount by which a process can descrease its asynchronous I/O
    priority level.  */
 #define AIO_PRIO_DELTA_MAX	20
 
 /* Minimum size for a thread.  We are free to choose a reasonable value.  */
-#define PTHREAD_STACK_MIN	16384
+#define PTHREAD_STACK_MIN	24576
 
 /* Maximum number of timer expiration overruns.  */
 #define DELAYTIMER_MAX	2147483647
@@ -93,3 +87,6 @@
 
 /* Maximum message queue priority level.  */
 #define MQ_PRIO_MAX		32768
+
+/* Maximum value the semaphore can have.  */
+#define SEM_VALUE_MAX   (2147483647)
diff --git a/libc/sysdeps/linux/common/bits/local_lim.h b/libc/sysdeps/linux/common/bits/local_lim.h
index a263b5d..8f0df4f 100644
--- a/libc/sysdeps/linux/common/bits/local_lim.h
+++ b/libc/sysdeps/linux/common/bits/local_lim.h
@@ -71,6 +71,8 @@
 
 /* The number of threads per process.  */
 #define _POSIX_THREAD_THREADS_MAX	64
+/* We have no predefined limit on the number of threads.  */
+#undef PTHREAD_THREADS_MAX
 
 /* Maximum amount by which a process can descrease its asynchronous I/O
    priority level.  */
@@ -93,3 +95,6 @@
 
 /* Maximum message queue priority level.  */
 #define MQ_PRIO_MAX		32768
+
+/* Maximum value the semaphore can have.  */
+#define SEM_VALUE_MAX   (2147483647)
diff --git a/libc/sysdeps/linux/common/bits/uClibc_local_lim.h b/libc/sysdeps/linux/common/bits/uClibc_local_lim.h
index abfc86d..832051c 100644
--- a/libc/sysdeps/linux/common/bits/uClibc_local_lim.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_local_lim.h
@@ -11,14 +11,19 @@
 #define	_BITS_UCLIBC_LOCAL_LIM_H	1
 
 /* This file works correctly only if local_lim.h is the NPTL version */
-#if !defined PTHREAD_KEYS_MAX || defined TIMER_MAX
+#if !defined PTHREAD_KEYS_MAX || defined TIMER_MAX || !defined SEM_VALUE_MAX
 # error local_lim.h was incorrectly updated, use the NPTL version from glibc
 #endif
 
 /* This should really be moved to thread specific directories */
 #if defined __UCLIBC_HAS_THREADS__ && !defined __UCLIBC_HAS_THREADS_NATIVE__
+/* glibc uses 16384 */
 # define PTHREAD_THREADS_MAX	1024
 # define TIMER_MAX		256
+# undef SEM_VALUE_MAX
+# undef PTHREAD_STACK_MIN
+/* glibc uses at least 16364 */
+# define PTHREAD_STACK_MIN	1024
 #endif
 
 #ifndef __UCLIBC_HAS_THREADS__
@@ -28,6 +33,7 @@
 # undef PTHREAD_DESTRUCTOR_ITERATIONS
 # undef PTHREAD_STACK_MIN
 # undef DELAYTIMER_MAX
+# undef SEM_VALUE_MAX
 #endif
 
 #endif /* bits/uClibc_local_lim.h */
diff --git a/libc/sysdeps/linux/common/bits/local_lim.h b/libc/sysdeps/linux/ia64/bits/local_lim.h
similarity index 83%
copy from libc/sysdeps/linux/common/bits/local_lim.h
copy to libc/sysdeps/linux/ia64/bits/local_lim.h
index a263b5d..4b8a035 100644
--- a/libc/sysdeps/linux/common/bits/local_lim.h
+++ b/libc/sysdeps/linux/ia64/bits/local_lim.h
@@ -1,18 +1,18 @@
-/* Minimum guaranteed maximum values for system limits.  Linux version.
+/* Minimum guaranteed maximum values for system limits.  Linux/IA-64 version.
    Copyright (C) 1993-1998,2000,2002-2004,2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License as
-   published by the Free Software Foundation; either version 2.1 of the
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
    License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
+   Library General Public License for more details.
 
-   You should have received a copy of the GNU Lesser General Public
+   You should have received a copy of the GNU Library General Public
    License along with the GNU C Library; see the file COPYING.LIB.  If not,
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
@@ -71,13 +71,15 @@
 
 /* The number of threads per process.  */
 #define _POSIX_THREAD_THREADS_MAX	64
+/* We have no predefined limit on the number of threads.  */
+#undef PTHREAD_THREADS_MAX
 
 /* Maximum amount by which a process can descrease its asynchronous I/O
    priority level.  */
 #define AIO_PRIO_DELTA_MAX	20
 
 /* Minimum size for a thread.  We are free to choose a reasonable value.  */
-#define PTHREAD_STACK_MIN	16384
+#define PTHREAD_STACK_MIN	196608
 
 /* Maximum number of timer expiration overruns.  */
 #define DELAYTIMER_MAX	2147483647
@@ -93,3 +95,6 @@
 
 /* Maximum message queue priority level.  */
 #define MQ_PRIO_MAX		32768
+
+/* Maximum value the semaphore can have.  */
+#define SEM_VALUE_MAX   (2147483647)
diff --git a/libc/sysdeps/linux/common/bits/local_lim.h b/libc/sysdeps/linux/powerpc/bits/local_lim.h
similarity index 86%
copy from libc/sysdeps/linux/common/bits/local_lim.h
copy to libc/sysdeps/linux/powerpc/bits/local_lim.h
index a263b5d..8b836a9 100644
--- a/libc/sysdeps/linux/common/bits/local_lim.h
+++ b/libc/sysdeps/linux/powerpc/bits/local_lim.h
@@ -1,5 +1,6 @@
-/* Minimum guaranteed maximum values for system limits.  Linux version.
-   Copyright (C) 1993-1998,2000,2002-2004,2008 Free Software Foundation, Inc.
+/* Minimum guaranteed maximum values for system limits.  Linux/PPC version.
+   Copyright (C) 1993-1998,2000,2002-2004,2006,2008
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -71,13 +72,16 @@
 
 /* The number of threads per process.  */
 #define _POSIX_THREAD_THREADS_MAX	64
+/* We have no predefined limit on the number of threads.  */
+#undef PTHREAD_THREADS_MAX
 
 /* Maximum amount by which a process can descrease its asynchronous I/O
    priority level.  */
 #define AIO_PRIO_DELTA_MAX	20
 
-/* Minimum size for a thread.  We are free to choose a reasonable value.  */
-#define PTHREAD_STACK_MIN	16384
+/* Minimum size for a thread.  At least two pages for systems with 64k
+   pages.  */
+#define PTHREAD_STACK_MIN	131072
 
 /* Maximum number of timer expiration overruns.  */
 #define DELAYTIMER_MAX	2147483647
@@ -93,3 +97,6 @@
 
 /* Maximum message queue priority level.  */
 #define MQ_PRIO_MAX		32768
+
+/* Maximum value the semaphore can have.  */
+#define SEM_VALUE_MAX   (2147483647)
diff --git a/libc/sysdeps/linux/common/bits/local_lim.h b/libc/sysdeps/linux/sparc/bits/local_lim.h
similarity index 83%
copy from libc/sysdeps/linux/common/bits/local_lim.h
copy to libc/sysdeps/linux/sparc/bits/local_lim.h
index a263b5d..6e35603 100644
--- a/libc/sysdeps/linux/common/bits/local_lim.h
+++ b/libc/sysdeps/linux/sparc/bits/local_lim.h
@@ -1,18 +1,18 @@
-/* Minimum guaranteed maximum values for system limits.  Linux version.
+/* Minimum guaranteed maximum values for system limits.  Linux/SPARC version.
    Copyright (C) 1993-1998,2000,2002-2004,2008 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public License as
-   published by the Free Software Foundation; either version 2.1 of the
+   modify it under the terms of the GNU Library General Public License as
+   published by the Free Software Foundation; either version 2 of the
    License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
+   Library General Public License for more details.
 
-   You should have received a copy of the GNU Lesser General Public
+   You should have received a copy of the GNU Library General Public
    License along with the GNU C Library; see the file COPYING.LIB.  If not,
    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
@@ -71,13 +71,15 @@
 
 /* The number of threads per process.  */
 #define _POSIX_THREAD_THREADS_MAX	64
+/* We have no predefined limit on the number of threads.  */
+#undef PTHREAD_THREADS_MAX
 
 /* Maximum amount by which a process can descrease its asynchronous I/O
    priority level.  */
 #define AIO_PRIO_DELTA_MAX	20
 
 /* Minimum size for a thread.  We are free to choose a reasonable value.  */
-#define PTHREAD_STACK_MIN	16384
+#define PTHREAD_STACK_MIN	24576
 
 /* Maximum number of timer expiration overruns.  */
 #define DELAYTIMER_MAX	2147483647
@@ -93,3 +95,6 @@
 
 /* Maximum message queue priority level.  */
 #define MQ_PRIO_MAX		32768
+
+/* Maximum value the semaphore can have.  */
+#define SEM_VALUE_MAX   (2147483647)


More information about the uClibc-cvs mailing list