Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 1 | #ifndef NDNBOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED |
| 2 | #define NDNBOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 3 | |
| 4 | // MS compatible compilers support #pragma once |
| 5 | |
| 6 | #if defined(_MSC_VER) && (_MSC_VER >= 1020) |
| 7 | # pragma once |
| 8 | #endif |
| 9 | |
| 10 | // |
Jeff Thompson | 9939dcd | 2013-10-15 15:12:24 -0700 | [diff] [blame] | 11 | // ndnboost/detail/lightweight_mutex.hpp - lightweight mutex |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 12 | // |
| 13 | // Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd. |
| 14 | // |
| 15 | // Distributed under the Boost Software License, Version 1.0. (See |
| 16 | // accompanying file LICENSE_1_0.txt or copy at |
| 17 | // http://www.boost.org/LICENSE_1_0.txt) |
| 18 | // |
| 19 | // typedef <unspecified> ndnboost::detail::lightweight_mutex; |
| 20 | // |
| 21 | // ndnboost::detail::lightweight_mutex is a header-only implementation of |
| 22 | // a subset of the Mutex concept requirements: |
| 23 | // |
| 24 | // http://www.boost.org/doc/html/threads/concepts.html#threads.concepts.Mutex |
| 25 | // |
| 26 | // It maps to a CRITICAL_SECTION on Windows or a pthread_mutex on POSIX. |
| 27 | // |
| 28 | |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame] | 29 | #include <ndnboost/config.hpp> |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 30 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 31 | #if !defined(NDNBOOST_HAS_THREADS) |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame] | 32 | # include <ndnboost/smart_ptr/detail/lwm_nop.hpp> |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 33 | #elif defined(NDNBOOST_HAS_PTHREADS) |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame] | 34 | # include <ndnboost/smart_ptr/detail/lwm_pthreads.hpp> |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 35 | #elif defined(NDNBOOST_HAS_WINTHREADS) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame] | 36 | # include <ndnboost/smart_ptr/detail/lwm_win32_cs.hpp> |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 37 | #else |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 38 | // Use #define NDNBOOST_DISABLE_THREADS to avoid the error |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 39 | # error Unrecognized threading platform |
| 40 | #endif |
| 41 | |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame^] | 42 | #endif // #ifndef NDNBOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED |