123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- #ifndef BOOST_INTERPROCESS_NULL_MUTEX_HPP
- #define BOOST_INTERPROCESS_NULL_MUTEX_HPP
- #ifndef BOOST_CONFIG_HPP
- # include <boost/config.hpp>
- #endif
- #
- #if defined(BOOST_HAS_PRAGMA_ONCE)
- # pragma once
- #endif
- #include <boost/interprocess/detail/config_begin.hpp>
- #include <boost/interprocess/detail/workaround.hpp>
- namespace boost {
- namespace interprocess {
- class null_mutex
- {
- #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
- null_mutex(const null_mutex&);
- null_mutex &operator= (const null_mutex&);
- #endif
- public:
-
-
- null_mutex() BOOST_NOEXCEPT {}
-
-
- ~null_mutex(){}
-
- void lock(){}
-
-
- bool try_lock()
- { return true; }
-
-
- template<class TimePoint>
- bool timed_lock(const TimePoint &)
- { return true; }
-
-
- template<class TimePoint>
- bool try_lock_until(const TimePoint &)
- { return true; }
-
-
- template<class Duration>
- bool try_lock_for(const Duration &)
- { return true; }
-
-
- void unlock(){}
-
-
- void lock_sharable(){}
-
-
- void lock_shared()
- { this->lock_sharable(); }
-
-
- bool try_lock_sharable()
- { return true; }
-
-
- bool try_lock_shared()
- { return this->try_lock_sharable(); }
-
-
- template<class TimePoint>
- bool timed_lock_sharable(const TimePoint &)
- { return true; }
-
-
- void unlock_sharable(){}
-
-
- void unlock_shared()
- { this->unlock_sharable(); }
-
-
- void lock_upgradable(){}
-
-
- bool try_lock_upgradable()
- { return true; }
-
-
- template<class TimePoint>
- bool timed_lock_upgradable(const TimePoint &)
- { return true; }
-
-
- void unlock_upgradable(){}
-
-
- void unlock_and_lock_upgradable(){}
-
-
- void unlock_and_lock_sharable(){}
-
-
- void unlock_upgradable_and_lock_sharable(){}
-
-
-
- void unlock_upgradable_and_lock(){}
-
-
- bool try_unlock_upgradable_and_lock()
- { return true; }
-
-
- template<class TimePoint>
- bool timed_unlock_upgradable_and_lock(const TimePoint &)
- { return true; }
-
-
- bool try_unlock_sharable_and_lock()
- { return true; }
-
-
- bool try_unlock_sharable_and_lock_upgradable()
- { return true; }
- };
- }
- }
- #include <boost/interprocess/detail/config_end.hpp>
- #endif
|