Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
null_mutex.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2005-2019 Intel Corporation
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 
16 
17 
18 
19 */
20 
21 #ifndef __TBB_null_mutex_H
22 #define __TBB_null_mutex_H
23 
24 #include "tbb_stddef.h"
25 
26 namespace tbb {
27 
29 
31 class null_mutex : internal::mutex_copy_deprecated_and_disabled {
32 public:
34  class scoped_lock : internal::no_copy {
35  public:
39  void acquire( null_mutex& ) {}
40  bool try_acquire( null_mutex& ) { return true; }
41  void release() {}
42  };
43 
45 
46  // Mutex traits
47  static const bool is_rw_mutex = false;
48  static const bool is_recursive_mutex = true;
49  static const bool is_fair_mutex = true;
50 };
51 
52 }
53 
54 #endif /* __TBB_null_mutex_H */
static const bool is_fair_mutex
Definition: null_mutex.h:49
static const bool is_recursive_mutex
Definition: null_mutex.h:48
Represents acquisition of a mutex.
Definition: null_mutex.h:34
The graph class.
bool try_acquire(null_mutex &)
Definition: null_mutex.h:40
static const bool is_rw_mutex
Definition: null_mutex.h:47
A mutex which does nothing.
Definition: null_mutex.h:31
void acquire(null_mutex &)
Definition: null_mutex.h:39

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.