boost_has_bethreads.ipp 653 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_BETHREADS
  7. // TITLE: BeOS Threads
  8. // DESCRIPTION: The platform supports BeOS style threads.
  9. #include <OS.h>
  10. namespace boost_has_bethreads{
  11. int test()
  12. {
  13. sem_id mut = create_sem(1, "test");
  14. if(mut > 0)
  15. {
  16. acquire_sem(mut);
  17. release_sem(mut);
  18. delete_sem(mut);
  19. }
  20. return 0;
  21. }
  22. }