tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock Class Reference

Represents acquisition of a mutex. More...

`#include <_mutex_padding.h>`

Inheritance diagram for tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock:
Collaboration diagram for tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock:

## Public Member Functions

| scoped_lock ()
| scoped_lock (padded_mutex &m, bool write=true)
| ~scoped_lock ()
void | acquire (padded_mutex &m, bool write=true)
bool | try_acquire (padded_mutex &m, bool write=true)
bool | upgrade_to_writer ()
bool | downgrade_to_reader ()
void | release ()

## Private Attributes

Mutex::scoped_lock | my_scoped_lock

## Additional Inherited Members

Private Member Functions inherited from tbb::internal::no_copy
| no_copy (const no_copy &)=delete
| no_copy ()=default

## Detailed Description

### template<typename Mutex>
class tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock

Represents acquisition of a mutex.

Definition at line 79 of file _mutex_padding.h.

## Constructor & Destructor Documentation

## scoped_lock() [1/2]

template<typename Mutex >

tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock::scoped_lock | ( |  | ) |

inline

Definition at line 82 of file _mutex_padding.h.

: my_scoped_lock() {}
tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock::my_scoped_lock
Mutex::scoped_lock my_scoped_lock
Definition: _mutex_padding.h:80

## scoped_lock() [2/2]

template<typename Mutex >

tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock::scoped_lock | ( | padded_mutex< Mutex, true > & | m,
|  | bool | write = `true`
| ) |  |

inline

Definition at line 83 of file _mutex_padding.h.

: my_scoped_lock(*m.impl(),write) { }

## ~scoped_lock()

template<typename Mutex >

tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock::~scoped_lock | ( |  | ) |

inline

Definition at line 84 of file _mutex_padding.h.

{ }

## Member Function Documentation

## acquire()

template<typename Mutex >

void tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock::acquire | ( | padded_mutex< Mutex, true > & | m,
|  | bool | write = `true`
| ) |  |

inline

Definition at line 86 of file _mutex_padding.h.

{ my_scoped_lock.acquire(*m.impl(),write); }

## downgrade_to_reader()

template<typename Mutex >

bool tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock::downgrade_to_reader | ( |  | ) |

inline

Definition at line 89 of file _mutex_padding.h.

{ return my_scoped_lock.downgrade_to_reader(); }

## release()

template<typename Mutex >

void tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock::release | ( |  | ) |

inline

Definition at line 90 of file _mutex_padding.h.

{ my_scoped_lock.release(); }

## try_acquire()

template<typename Mutex >

bool tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock::try_acquire | ( | padded_mutex< Mutex, true > & | m,
|  | bool | write = `true`
| ) |  |

inline

Definition at line 87 of file _mutex_padding.h.

{ return my_scoped_lock.try_acquire(*m.impl(),write); }

## upgrade_to_writer()

template<typename Mutex >

bool tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock::upgrade_to_writer | ( |  | ) |

inline

Definition at line 88 of file _mutex_padding.h.

{ return my_scoped_lock.upgrade_to_writer(); }

## Member Data Documentation

## my_scoped_lock

template<typename Mutex >

Mutex::scoped_lock tbb::interface7::internal::padded_mutex< Mutex, true >::scoped_lock::my_scoped_lock

private

Definition at line 80 of file _mutex_padding.h.

The documentation for this class was generated from the following file:

- _mutex_padding.h

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.