local_lim.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /* Minimum guaranteed maximum values for system limits. Linux/Alpha 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 Library General Public License as
  6. published by the Free Software Foundation; either version 2 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. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public
  13. License along with the GNU C Library; see the file COPYING.LIB. If not,
  14. 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. /* The kernel sources contain a file with all the needed information. */
  30. #include <linux/limits.h>
  31. /* Have to remove NR_OPEN? */
  32. #ifdef __undef_NR_OPEN
  33. # undef NR_OPEN
  34. # undef __undef_NR_OPEN
  35. #endif
  36. /* Have to remove LINK_MAX? */
  37. #ifdef __undef_LINK_MAX
  38. # undef LINK_MAX
  39. # undef __undef_LINK_MAX
  40. #endif
  41. /* Have to remove OPEN_MAX? */
  42. #ifdef __undef_OPEN_MAX
  43. # undef OPEN_MAX
  44. # undef __undef_OPEN_MAX
  45. #endif
  46. /* The number of data keys per process. */
  47. #define _POSIX_THREAD_KEYS_MAX 128
  48. /* This is the value this implementation supports. */
  49. #define PTHREAD_KEYS_MAX 1024
  50. /* Controlling the iterations of destructors for thread-specific data. */
  51. #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
  52. /* Number of iterations this implementation does. */
  53. #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
  54. /* The number of threads per process. */
  55. #define _POSIX_THREAD_THREADS_MAX 64
  56. /* We have no predefined limit on the number of threads. */
  57. #undef PTHREAD_THREADS_MAX
  58. /* Maximum amount by which a process can descrease its asynchronous I/O
  59. priority level. */
  60. #define AIO_PRIO_DELTA_MAX 20
  61. /* Minimum size for a thread. We are free to choose a reasonable value. */
  62. #define PTHREAD_STACK_MIN 24576
  63. /* Maximum number of timer expiration overruns. */
  64. #define DELAYTIMER_MAX 2147483647
  65. /* Maximum tty name length. */
  66. #define TTY_NAME_MAX 32
  67. /* Maximum login name length. This is arbitrary. */
  68. #define LOGIN_NAME_MAX 256
  69. /* Maximum host name length. */
  70. #define HOST_NAME_MAX 64
  71. /* Maximum message queue priority level. */
  72. #define MQ_PRIO_MAX 32768
  73. /* Maximum value the semaphore can have. */
  74. #define SEM_VALUE_MAX (2147483647)