local_lim.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /* Minimum guaranteed maximum values for system limits. Linux/PPC version.
  2. Copyright (C) 1993-1998,2000,2002-2004,2006,2008
  3. Free Software Foundation, Inc.
  4. This file is part of the GNU C Library.
  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. The GNU C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with the GNU C Library; see the file COPYING.LIB. If
  15. not, see <http://www.gnu.org/licenses/>. */
  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. At least two pages for systems with 64k
  71. pages. */
  72. #define PTHREAD_STACK_MIN 131072
  73. /* Maximum number of timer expiration overruns. */
  74. #define DELAYTIMER_MAX 2147483647
  75. /* Maximum tty name length. */
  76. #define TTY_NAME_MAX 32
  77. /* Maximum login name length. This is arbitrary. */
  78. #define LOGIN_NAME_MAX 256
  79. /* Maximum host name length. */
  80. #define HOST_NAME_MAX 64
  81. /* Maximum message queue priority level. */
  82. #define MQ_PRIO_MAX 32768
  83. /* Maximum value the semaphore can have. */
  84. #define SEM_VALUE_MAX (2147483647)