local_lim.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /* Minimum guaranteed maximum values for system limits. Linux version.
  2. Copyright (C) 1993-1998,2000,2002,2003,2004 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. /* The kernel sources contain a file with all the needed information. */
  31. #include <linux/limits.h>
  32. /* Have to remove NR_OPEN? */
  33. #ifdef __undef_NR_OPEN
  34. # undef NR_OPEN
  35. # undef __undef_NR_OPEN
  36. #endif
  37. /* Have to remove LINK_MAX? */
  38. #ifdef __undef_LINK_MAX
  39. # undef LINK_MAX
  40. # undef __undef_LINK_MAX
  41. #endif
  42. /* Have to remove OPEN_MAX? */
  43. #ifdef __undef_OPEN_MAX
  44. # undef OPEN_MAX
  45. # undef __undef_OPEN_MAX
  46. #endif
  47. /* The number of data keys per process. */
  48. #define _POSIX_THREAD_KEYS_MAX 128
  49. /* This is the value this implementation supports. */
  50. #define PTHREAD_KEYS_MAX 1024
  51. /* Controlling the iterations of destructors for thread-specific data. */
  52. #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
  53. /* Number of iterations this implementation does. */
  54. #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
  55. /* The number of threads per process. */
  56. #define _POSIX_THREAD_THREADS_MAX 64
  57. /* Maximum amount by which a process can descrease its asynchronous I/O
  58. priority level. */
  59. #define AIO_PRIO_DELTA_MAX 20
  60. /* Minimum size for a thread. We are free to choose a reasonable value. */
  61. #define PTHREAD_STACK_MIN 16384
  62. /* Maximum number of timer expiration overruns. */
  63. #define DELAYTIMER_MAX 2147483647
  64. /* Maximum tty name length. */
  65. #define TTY_NAME_MAX 32
  66. /* Maximum login name length. This is arbitrary. */
  67. #define LOGIN_NAME_MAX 256
  68. /* Maximum host name length. */
  69. #define HOST_NAME_MAX 64
  70. /* Maximum message queue priority level. */
  71. #define MQ_PRIO_MAX 32768