Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Class null_mutex

boost::interprocess::null_mutex

Synopsis

// In header: <boost/interprocess/sync/null_mutex.hpp>


class null_mutex {
public:
  // construct/copy/destruct
  null_mutex();
  ~null_mutex();

  // public member functions
  void lock();
  bool try_lock();
  bool timed_lock(const boost::posix_time::ptime &);
  void unlock();
  void lock_sharable();
  bool try_lock_sharable();
  bool timed_lock_sharable(const boost::posix_time::ptime &);
  void unlock_sharable();
  void lock_upgradable();
  bool try_lock_upgradable();
  bool timed_lock_upgradable(const boost::posix_time::ptime &);
  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();
  bool timed_unlock_upgradable_and_lock(const boost::posix_time::ptime &);
  bool try_unlock_sharable_and_lock();
  bool try_unlock_sharable_and_lock_upgradable();
};

Description

Implements a mutex that simulates a mutex without doing any operation and simulates a successful operation.

null_mutex public construct/copy/destruct

  1. null_mutex();

    Constructor. Empty.

  2. ~null_mutex();

    Destructor. Empty.

null_mutex public member functions

  1. void lock();
    Simulates a mutex lock() operation. Empty function.
  2. bool try_lock();

    Simulates a mutex try_lock() operation. Equivalent to "return true;"

  3. bool timed_lock(const boost::posix_time::ptime &);

    Simulates a mutex timed_lock() operation. Equivalent to "return true;"

  4. void unlock();

    Simulates a mutex unlock() operation. Empty function.

  5. void lock_sharable();

    Simulates a mutex lock_sharable() operation. Empty function.

  6. bool try_lock_sharable();

    Simulates a mutex try_lock_sharable() operation. Equivalent to "return true;"

  7. bool timed_lock_sharable(const boost::posix_time::ptime &);

    Simulates a mutex timed_lock_sharable() operation. Equivalent to "return true;"

  8. void unlock_sharable();

    Simulates a mutex unlock_sharable() operation. Empty function.

  9. void lock_upgradable();

    Simulates a mutex lock_upgradable() operation. Empty function.

  10. bool try_lock_upgradable();

    Simulates a mutex try_lock_upgradable() operation. Equivalent to "return true;"

  11. bool timed_lock_upgradable(const boost::posix_time::ptime &);

    Simulates a mutex timed_lock_upgradable() operation. Equivalent to "return true;"

  12. void unlock_upgradable();

    Simulates a mutex unlock_upgradable() operation. Empty function.

  13. void unlock_and_lock_upgradable();

    Simulates unlock_and_lock_upgradable(). Empty function.

  14. void unlock_and_lock_sharable();

    Simulates unlock_and_lock_sharable(). Empty function.

  15. void unlock_upgradable_and_lock_sharable();

    Simulates unlock_upgradable_and_lock_sharable(). Empty function.

  16. void unlock_upgradable_and_lock();

    Simulates unlock_upgradable_and_lock(). Empty function.

  17. bool try_unlock_upgradable_and_lock();

    Simulates try_unlock_upgradable_and_lock(). Equivalent to "return true;"

  18. bool timed_unlock_upgradable_and_lock(const boost::posix_time::ptime &);

    Simulates timed_unlock_upgradable_and_lock(). Equivalent to "return true;"

  19. bool try_unlock_sharable_and_lock();

    Simulates try_unlock_sharable_and_lock(). Equivalent to "return true;"

  20. bool try_unlock_sharable_and_lock_upgradable();

    Simulates try_unlock_sharable_and_lock_upgradable(). Equivalent to "return true;"


PrevUpHomeNext