boost_has_pthread_yield.ipp 657 B

12345678910111213141516171819202122232425262728293031323334
  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_YIELD
  7. // TITLE: pthread_yield
  8. // DESCRIPTION: The platform supports non standard API pthread_yield.
  9. #include <pthread.h>
  10. namespace boost_has_pthread_yield{
  11. void f()
  12. {
  13. // this is never called, it just has to compile:
  14. int res = pthread_yield();
  15. (void)res;
  16. }
  17. int test()
  18. {
  19. return 0;
  20. }
  21. }