/*---------------------------------------------------------------------------* Project: NintendoWare File: os_Mutex.h Copyright (C)2009-2011 Nintendo/HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo and/or its licensed developers and are protected by national and international copyright laws. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. The content herein is highly confidential and should be handled accordingly. $Revision: 31311 $ *---------------------------------------------------------------------------*/ #ifndef NW_OS_MUTEX_H_ #define NW_OS_MUTEX_H_ #include #include #include NW_ADAPTIVE_HEADER(nw/os/platform/os_Mutex, NW_PLATFORM_NAME.h) namespace nw { namespace os { //--------------------------------------------------------------------------- //! @brief 排他をおこなうロックオブジェクトです。 //--------------------------------------------------------------------------- typedef nw::os::internal::LockObject LockObject; //--------------------------------------------------------------------------- //! @brief 空のロックオブジェクトです。 //--------------------------------------------------------------------------- class NullLockObject { public: //--------------------------------------------------------------------------- //! @brief ロックをおこないます。 //--------------------------------------------------------------------------- void Lock() {} //--------------------------------------------------------------------------- //! @brief ロックの取得を試みて、失敗した場合は false を返します。 //! //! @return ロックに成功した場合は true、失敗した場合は false を返します。 //--------------------------------------------------------------------------- bool TryLock() { return true; } //--------------------------------------------------------------------------- //! @brief ロックを解除します。 //--------------------------------------------------------------------------- void Unlock() {} }; } // namespace os } // namespace nw #endif /* NW_OS_MUTEX_H_ */