Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
null_rw_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_rw_mutex_H
18 #define __TBB_null_rw_mutex_H
19 
20 #include "tbb_stddef.h"
21 
22 namespace tbb {
23 
25 
28 public:
31  public:
33  scoped_lock( null_rw_mutex& , bool = true ) {}
35  void acquire( null_rw_mutex& , bool = true ) {}
36  bool upgrade_to_writer() { return true; }
37  bool downgrade_to_reader() { return true; }
38  bool try_acquire( null_rw_mutex& , bool = true ) { return true; }
39  void release() {}
40  };
41 
43 
44  // Mutex traits
45  static const bool is_rw_mutex = true;
46  static const bool is_recursive_mutex = true;
47  static const bool is_fair_mutex = true;
48 };
49 
50 }
51 
52 #endif /* __TBB_null_rw_mutex_H */
tbb::null_rw_mutex::scoped_lock::try_acquire
bool try_acquire(null_rw_mutex &, bool=true)
Definition: null_rw_mutex.h:38
tbb::null_rw_mutex::is_recursive_mutex
static const bool is_recursive_mutex
Definition: null_rw_mutex.h:46
tbb::null_rw_mutex::scoped_lock::release
void release()
Definition: null_rw_mutex.h:39
tbb::internal::mutex_copy_deprecated_and_disabled
Definition: tbb_stddef.h:365
tbb::null_rw_mutex::scoped_lock::scoped_lock
scoped_lock(null_rw_mutex &, bool=true)
Definition: null_rw_mutex.h:33
tbb::null_rw_mutex
A rw mutex which does nothing.
Definition: null_rw_mutex.h:27
tbb
The graph class.
Definition: serial/tbb/parallel_for.h:46
tbb::null_rw_mutex::scoped_lock::acquire
void acquire(null_rw_mutex &, bool=true)
Definition: null_rw_mutex.h:35
tbb::null_rw_mutex::scoped_lock::~scoped_lock
~scoped_lock()
Definition: null_rw_mutex.h:34
tbb::null_rw_mutex::null_rw_mutex
null_rw_mutex()
Definition: null_rw_mutex.h:42
tbb::null_rw_mutex::scoped_lock::downgrade_to_reader
bool downgrade_to_reader()
Definition: null_rw_mutex.h:37
tbb::null_rw_mutex::scoped_lock::upgrade_to_writer
bool upgrade_to_writer()
Definition: null_rw_mutex.h:36
tbb::null_rw_mutex::scoped_lock
Represents acquisition of a mutex.
Definition: null_rw_mutex.h:30
tbb::internal::no_copy
Base class for types that should not be copied or assigned.
Definition: tbb_stddef.h:330
tbb::null_rw_mutex::is_fair_mutex
static const bool is_fair_mutex
Definition: null_rw_mutex.h:47
tbb_stddef.h
tbb::null_rw_mutex::is_rw_mutex
static const bool is_rw_mutex
Definition: null_rw_mutex.h:45
tbb::null_rw_mutex::scoped_lock::scoped_lock
scoped_lock()
Definition: null_rw_mutex.h:32

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.