local_lim.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. /* uClibc likes to have a definition of OPEN_MAX */
  28. #if 0
  29. #ifndef OPEN_MAX
  30. # define __undef_OPEN_MAX
  31. #endif
  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. /* The number of data keys per process. */
  51. #define _POSIX_THREAD_KEYS_MAX 128
  52. /* This is the value this implementation supports. */
  53. #define PTHREAD_KEYS_MAX 1024
  54. /* Controlling the iterations of destructors for thread-specific data. */
  55. #define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
  56. /* Number of iterations this implementation does. */
  57. #define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
  58. /* The number of threads per process. */
  59. #define _POSIX_THREAD_THREADS_MAX 64
  60. /* This is the value this implementation supports. */
  61. #define PTHREAD_THREADS_MAX 1024
  62. /* Maximum amount by which a process can descrease its asynchronous I/O
  63. priority level. */
  64. #define AIO_PRIO_DELTA_MAX 20
  65. /* Minimum size for a thread. We are free to choose a reasonable value. */
  66. #define PTHREAD_STACK_MIN 16384
  67. /* Maximum number of POSIX timers available. */
  68. #define TIMER_MAX 256