uClibc_local_lim.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
  3. *
  4. * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  5. */
  6. /*
  7. * Never include this file directly; use <unistd.h> instead.
  8. */
  9. #ifndef _BITS_UCLIBC_LOCAL_LIM_H
  10. #define _BITS_UCLIBC_LOCAL_LIM_H 1
  11. /* This file works correctly only if local_lim.h is the NPTL version */
  12. #if !defined PTHREAD_KEYS_MAX || defined TIMER_MAX || !defined SEM_VALUE_MAX
  13. # error local_lim.h was incorrectly updated, use the NPTL version from glibc
  14. #endif
  15. /* This should really be moved to thread specific directories */
  16. #if defined __UCLIBC_HAS_THREADS__ && !defined __UCLIBC_HAS_THREADS_NATIVE__
  17. /* glibc uses 16384 */
  18. # define PTHREAD_THREADS_MAX 1024
  19. # define TIMER_MAX 256
  20. # ifdef __UCLIBC_HAS_LINUXTHREADS__
  21. # undef SEM_VALUE_MAX
  22. # define SEM_VALUE_MAX ((int) ((~0u) >> 1))
  23. # endif
  24. # undef PTHREAD_STACK_MIN
  25. /* glibc uses at least 16364 */
  26. # define PTHREAD_STACK_MIN 1024
  27. #endif
  28. #ifndef __UCLIBC_HAS_THREADS__
  29. # undef _POSIX_THREAD_KEYS_MAX
  30. # undef PTHREAD_KEYS_MAX
  31. # undef _POSIX_THREAD_DESTRUCTOR_ITERATIONS
  32. # undef PTHREAD_DESTRUCTOR_ITERATIONS
  33. # undef PTHREAD_STACK_MIN
  34. # undef DELAYTIMER_MAX
  35. # undef SEM_VALUE_MAX
  36. #endif
  37. #endif /* bits/uClibc_local_lim.h */