local_lim.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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
  14. not, see <http://www.gnu.org/licenses/>. */
  15. /* The kernel header pollutes the namespace with the NR_OPEN symbol
  16. and defines LINK_MAX although filesystems have different maxima. A
  17. similar thing is true for OPEN_MAX: the limit can be changed at
  18. runtime and therefore the macro must not be defined. Remove this
  19. after including the header if necessary. */
  20. #ifndef NR_OPEN
  21. # define __undef_NR_OPEN
  22. #endif
  23. #ifndef LINK_MAX
  24. # define __undef_LINK_MAX
  25. #endif
  26. #ifndef OPEN_MAX
  27. # define __undef_OPEN_MAX
  28. #endif
  29. #ifndef ARG_MAX
  30. # define __undef_ARG_MAX
  31. #endif
  32. /* The kernel sources contain a file with all the needed information. */
  33. #include <linux/limits.h>
  34. /* Have to remove NR_OPEN? */
  35. #ifdef __undef_NR_OPEN
  36. # undef NR_OPEN
  37. # undef __undef_NR_OPEN
  38. #endif
  39. /* Have to remove LINK_MAX? */
  40. #ifdef __undef_LINK_MAX
  41. # undef LINK_MAX
  42. # undef __undef_LINK_MAX
  43. #endif
  44. /* Have to remove OPEN_MAX? */
  45. #ifdef __undef_OPEN_MAX
  46. # undef OPEN_MAX
  47. # undef __undef_OPEN_MAX
  48. #endif
  49. /* Have to remove ARG_MAX? */
  50. #ifdef __undef_ARG_MAX
  51. # undef ARG_MAX
  52. # undef __undef_ARG_MAX
  53. #endif
  54. /* The number of data keys per process. */
  55. #define _POSIX_THREAD_KEYS_MAX 128
  56. /* This is the value this implementation supports. */
  57. #define PTHREAD_KEYS_MAX 1024
  58. /* Controlling the iterations of destructors for thread-specific data. */
  59. #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
  60. /* Number of iterations this implementation does. */
  61. #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
  62. /* The number of threads per process. */
  63. #define _POSIX_THREAD_THREADS_MAX 64
  64. /* We have no predefined limit on the number of threads. */
  65. #undef PTHREAD_THREADS_MAX
  66. /* Maximum amount by which a process can descrease its asynchronous I/O
  67. priority level. */
  68. #define AIO_PRIO_DELTA_MAX 20
  69. /* Minimum size for a thread. We are free to choose a reasonable value. */
  70. #define PTHREAD_STACK_MIN 16384
  71. /* Maximum number of timer expiration overruns. */
  72. #define DELAYTIMER_MAX 2147483647
  73. /* Maximum tty name length. */
  74. #define TTY_NAME_MAX 32
  75. /* Maximum login name length. This is arbitrary. */
  76. #define LOGIN_NAME_MAX 256
  77. /* Maximum host name length. */
  78. #define HOST_NAME_MAX 64
  79. /* Maximum message queue priority level. */
  80. #define MQ_PRIO_MAX 32768
  81. /* Maximum value the semaphore can have. */
  82. #define SEM_VALUE_MAX (2147483647)