local_lim.h 3.2 KB

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