local_lim.h 3.2 KB

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