Home ⌂Doc Index ◂Up ▴
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-2020 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 #ifndef __TBB_null_mutex_H
18 #define __TBB_null_mutex_H
19 
20 #include "tbb_stddef.h"
21 
22 namespace tbb {
23 
25 
28 public:
31  public:
35  void acquire( null_mutex& ) {}
36  bool try_acquire( null_mutex& ) { return true; }
37  void release() {}
38  };
39 
41 
42  // Mutex traits
43  static const bool is_rw_mutex = false;
44  static const bool is_recursive_mutex = true;
45  static const bool is_fair_mutex = true;
46 };
47 
48 }
49 
50 #endif /* __TBB_null_mutex_H */
static const bool is_rw_mutex
Definition: null_mutex.h:43
A mutex which does nothing.
Definition: null_mutex.h:27
static const bool is_fair_mutex
Definition: null_mutex.h:45
static const bool is_recursive_mutex
Definition: null_mutex.h:44
void acquire(null_mutex &)
Definition: null_mutex.h:35
Represents acquisition of a mutex.
Definition: null_mutex.h:30
Base class for types that should not be copied or assigned.
Definition: tbb_stddef.h:330
bool try_acquire(null_mutex &)
Definition: null_mutex.h:36
The graph class.

Copyright © 2005-2020 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.