00001 /* 00002 Copyright 2005-2009 Intel Corporation. All Rights Reserved. 00003 00004 The source code contained or described herein and all documents related 00005 to the source code ("Material") are owned by Intel Corporation or its 00006 suppliers or licensors. Title to the Material remains with Intel 00007 Corporation or its suppliers and licensors. The Material is protected 00008 by worldwide copyright laws and treaty provisions. No part of the 00009 Material may be used, copied, reproduced, modified, published, uploaded, 00010 posted, transmitted, distributed, or disclosed in any way without 00011 Intel's prior express written permission. 00012 00013 No license under any patent, copyright, trade secret or other 00014 intellectual property right is granted to or conferred upon you by 00015 disclosure or delivery of the Materials, either expressly, by 00016 implication, inducement, estoppel or otherwise. Any license under such 00017 intellectual property rights must be express and approved by Intel in 00018 writing. 00019 */ 00020 00021 #ifndef __TBB_null_mutex_H 00022 #define __TBB_null_mutex_H 00023 00024 namespace tbb { 00025 00027 00029 class null_mutex { 00031 null_mutex( const null_mutex& ); 00032 void operator=( const null_mutex& ); 00033 public: 00035 class scoped_lock { 00036 public: 00037 scoped_lock() {} 00038 scoped_lock( null_mutex& ) {} 00039 ~scoped_lock() {} 00040 void acquire( null_mutex& ) {} 00041 bool try_acquire( null_mutex& ) { return true; } 00042 void release() {} 00043 }; 00044 00045 null_mutex() {} 00046 00047 // Mutex traits 00048 static const bool is_rw_mutex = false; 00049 static const bool is_recursive_mutex = true; 00050 static const bool is_fair_mutex = true; 00051 }; 00052 00053 } 00054 00055 #endif /* __TBB_null_mutex_H */