x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
null_mutex.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\interprocess\sync\null_mutex.hpp
旋转
特效
属性
历史版本
////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2005-2008. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/interprocess for documentation. // ////////////////////////////////////////////////////////////////////////////// #ifndef BOOST_INTERPROCESS_NULL_MUTEX_HPP #define BOOST_INTERPROCESS_NULL_MUTEX_HPP #if (defined _MSC_VER) && (_MSC_VER >= 1200) # pragma once #endif #include
#include
//!\file //!Describes null_mutex classes namespace boost { namespace posix_time { class ptime; } namespace interprocess { //!Implements a mutex that simulates a mutex without doing any operation and //!simulates a successful operation. class null_mutex { /// @cond null_mutex(const null_mutex&); null_mutex &operator= (const null_mutex&); /// @endcond public: //!Constructor. //!Empty. null_mutex(){} //!Destructor. //!Empty. ~null_mutex(){} //!Simulates a mutex lock() operation. Empty function. void lock(){} //!Simulates a mutex try_lock() operation. //!Equivalent to "return true;" bool try_lock() { return true; } //!Simulates a mutex timed_lock() operation. //!Equivalent to "return true;" bool timed_lock(const boost::posix_time::ptime &) { return true; } //!Simulates a mutex unlock() operation. //!Empty function. void unlock(){} //!Simulates a mutex lock_sharable() operation. //!Empty function. void lock_sharable(){} //!Simulates a mutex try_lock_sharable() operation. //!Equivalent to "return true;" bool try_lock_sharable() { return true; } //!Simulates a mutex timed_lock_sharable() operation. //!Equivalent to "return true;" bool timed_lock_sharable(const boost::posix_time::ptime &) { return true; } //!Simulates a mutex unlock_sharable() operation. //!Empty function. void unlock_sharable(){} //!Simulates a mutex lock_upgradable() operation. //!Empty function. void lock_upgradable(){} //!Simulates a mutex try_lock_upgradable() operation. //!Equivalent to "return true;" bool try_lock_upgradable() { return true; } //!Simulates a mutex timed_lock_upgradable() operation. //!Equivalent to "return true;" bool timed_lock_upgradable(const boost::posix_time::ptime &) { return true; } //!Simulates a mutex unlock_upgradable() operation. //!Empty function. void unlock_upgradable(){} //!Simulates unlock_and_lock_upgradable(). //!Empty function. void unlock_and_lock_upgradable(){} //!Simulates unlock_and_lock_sharable(). //!Empty function. void unlock_and_lock_sharable(){} //!Simulates unlock_upgradable_and_lock_sharable(). //!Empty function. void unlock_upgradable_and_lock_sharable(){} //Promotions //!Simulates unlock_upgradable_and_lock(). //!Empty function. void unlock_upgradable_and_lock(){} //!Simulates try_unlock_upgradable_and_lock(). //!Equivalent to "return true;" bool try_unlock_upgradable_and_lock() { return true; } //!Simulates timed_unlock_upgradable_and_lock(). //!Equivalent to "return true;" bool timed_unlock_upgradable_and_lock(const boost::posix_time::ptime &) { return true; } //!Simulates try_unlock_sharable_and_lock(). //!Equivalent to "return true;" bool try_unlock_sharable_and_lock() { return true; } //!Simulates try_unlock_sharable_and_lock_upgradable(). //!Equivalent to "return true;" bool try_unlock_sharable_and_lock_upgradable() { return true; } }; } //namespace interprocess { } //namespace boost { #include
#endif //BOOST_INTERPROCESS_NULL_MUTEX_HPP
null_mutex.hpp
网页地址
文件地址
上一页
15/18
下一页
下载
( 4 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.