boost_has_pthread_ma_st.ipp 780 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // (C) Copyright John Maddock 2001.
  2. // Use, modification and distribution are subject to the
  3. // Boost Software License, Version 1.0. (See accompanying file
  4. // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. // See http://www.boost.org/libs/config for most recent version.
  6. // MACRO: BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
  7. // TITLE: pthread_mutexattr_settype
  8. // DESCRIPTION: The platform supports POSIX API pthread_mutexattr_settype.
  9. #include <pthread.h>
  10. namespace boost_has_pthread_mutexattr_settype{
  11. void f()
  12. {
  13. // this is never called, it just has to compile:
  14. pthread_mutexattr_t attr;
  15. pthread_mutexattr_init(&attr);
  16. int type = 0;
  17. pthread_mutexattr_settype(&attr, type);
  18. }
  19. int test()
  20. {
  21. return 0;
  22. }
  23. }