local_lim.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. /* Maximum amount by which a process can descrease its asynchronous I/O
  66. priority level. */
  67. #define AIO_PRIO_DELTA_MAX 20
  68. /* Minimum size for a thread. We are free to choose a reasonable value. */
  69. #define PTHREAD_STACK_MIN 16384
  70. /* Maximum number of timer expiration overruns. */
  71. #define DELAYTIMER_MAX 2147483647
  72. /* Maximum tty name length. */
  73. #define TTY_NAME_MAX 32
  74. /* Maximum login name length. This is arbitrary. */
  75. #define LOGIN_NAME_MAX 256
  76. /* Maximum host name length. */
  77. #define HOST_NAME_MAX 64
  78. /* Maximum message queue priority level. */
  79. #define MQ_PRIO_MAX 32768