local_lim.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* Minimum guaranteed maximum values for system limits. Linux version.
  2. Copyright (C) 1993, 94, 95, 96, 97, 98, 2000 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. 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. /* This is the value this implementation supports. */
  58. #define PTHREAD_THREADS_MAX 1024
  59. /* Maximum amount by which a process can descrease its asynchronous I/O
  60. priority level. */
  61. #define AIO_PRIO_DELTA_MAX 20
  62. /* Minimum size for a thread. We are free to choose a reasonable value. */
  63. #define PTHREAD_STACK_MIN 16384
  64. /* Maximum number of POSIX timers available. */
  65. #define TIMER_MAX 256