Home | History | Annotate | Download | only in bits
      1 /* Minimum guaranteed maximum values for system limits.  Linux version.
      2    Copyright (C) 1993-1998,2000,2002-2004,2008 Free Software Foundation, Inc.
      3    This file is part of the GNU C Library.
      4 
      5    The GNU C Library is free software; you can redistribute it and/or
      6    modify it under the terms of the GNU Lesser General Public License as
      7    published by the Free Software Foundation; either version 2.1 of the
      8    License, or (at your option) any later version.
      9 
     10    The GNU C Library is distributed in the hope that it will be useful,
     11    but WITHOUT ANY WARRANTY; without even the implied warranty of
     12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
     13    Lesser General Public License for more details.
     14 
     15    You should have received a copy of the GNU Lesser General Public
     16    License along with the GNU C Library; see the file COPYING.LIB.  If not,
     17    write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
     18    Boston, MA 02111-1307, USA.  */
     19 
     20 /* The kernel header pollutes the namespace with the NR_OPEN symbol
     21    and defines LINK_MAX although filesystems have different maxima.  A
     22    similar thing is true for OPEN_MAX: the limit can be changed at
     23    runtime and therefore the macro must not be defined.  Remove this
     24    after including the header if necessary.  */
     25 #ifndef NR_OPEN
     26 # define __undef_NR_OPEN
     27 #endif
     28 #ifndef LINK_MAX
     29 # define __undef_LINK_MAX
     30 #endif
     31 #ifndef OPEN_MAX
     32 # define __undef_OPEN_MAX
     33 #endif
     34 #ifndef ARG_MAX
     35 # define __undef_ARG_MAX
     36 #endif
     37 
     38 /* The kernel sources contain a file with all the needed information.  */
     39 #include <linux/limits.h>
     40 
     41 /* Have to remove NR_OPEN?  */
     42 #ifdef __undef_NR_OPEN
     43 # undef NR_OPEN
     44 # undef __undef_NR_OPEN
     45 #endif
     46 /* Have to remove LINK_MAX?  */
     47 #ifdef __undef_LINK_MAX
     48 # undef LINK_MAX
     49 # undef __undef_LINK_MAX
     50 #endif
     51 /* Have to remove OPEN_MAX?  */
     52 #ifdef __undef_OPEN_MAX
     53 # undef OPEN_MAX
     54 # undef __undef_OPEN_MAX
     55 #endif
     56 /* Have to remove ARG_MAX?  */
     57 #ifdef __undef_ARG_MAX
     58 # undef ARG_MAX
     59 # undef __undef_ARG_MAX
     60 #endif
     61 
     62 /* The number of data keys per process.  */
     63 #define _POSIX_THREAD_KEYS_MAX	128
     64 /* This is the value this implementation supports.  */
     65 #define PTHREAD_KEYS_MAX	1024
     66 
     67 /* Controlling the iterations of destructors for thread-specific data.  */
     68 #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS	4
     69 /* Number of iterations this implementation does.  */
     70 #define PTHREAD_DESTRUCTOR_ITERATIONS	_POSIX_THREAD_DESTRUCTOR_ITERATIONS
     71 
     72 /* The number of threads per process.  */
     73 #define _POSIX_THREAD_THREADS_MAX	64
     74 /* We have no predefined limit on the number of threads.  */
     75 #undef PTHREAD_THREADS_MAX
     76 
     77 /* Maximum amount by which a process can descrease its asynchronous I/O
     78    priority level.  */
     79 #define AIO_PRIO_DELTA_MAX	20
     80 
     81 /* Minimum size for a thread.  We are free to choose a reasonable value.  */
     82 #define PTHREAD_STACK_MIN	16384
     83 
     84 /* Maximum number of timer expiration overruns.  */
     85 #define DELAYTIMER_MAX	2147483647
     86 
     87 /* Maximum tty name length.  */
     88 #define TTY_NAME_MAX		32
     89 
     90 /* Maximum login name length.  This is arbitrary.  */
     91 #define LOGIN_NAME_MAX		256
     92 
     93 /* Maximum host name length.  */
     94 #define HOST_NAME_MAX		64
     95 
     96 /* Maximum message queue priority level.  */
     97 #define MQ_PRIO_MAX		32768
     98 
     99 /* Maximum value the semaphore can have.  */
    100 #define SEM_VALUE_MAX   (2147483647)
    101