|
Last change
on this file since 8624d1f was b57ba05, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 3 years ago |
|
Update headers in C++ files
|
-
Property mode
set to
100644
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | /*
|
|---|
| 2 | * SPDX-FileCopyrightText: 2018 Jaroslav Jindrak
|
|---|
| 3 | *
|
|---|
| 4 | * SPDX-License-Identifier: BSD-3-Clause
|
|---|
| 5 | */
|
|---|
| 6 |
|
|---|
| 7 | #include <shared_mutex>
|
|---|
| 8 |
|
|---|
| 9 | namespace std
|
|---|
| 10 | {
|
|---|
| 11 | shared_timed_mutex::shared_timed_mutex() noexcept
|
|---|
| 12 | : mtx_{}
|
|---|
| 13 | {
|
|---|
| 14 | aux::threading::shared_mutex::init(mtx_);
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | shared_timed_mutex::~shared_timed_mutex()
|
|---|
| 18 | { /* DUMMY BODY */ }
|
|---|
| 19 |
|
|---|
| 20 | void shared_timed_mutex::lock()
|
|---|
| 21 | {
|
|---|
| 22 | aux::threading::shared_mutex::lock(mtx_);
|
|---|
| 23 | }
|
|---|
| 24 |
|
|---|
| 25 | bool shared_timed_mutex::try_lock()
|
|---|
| 26 | {
|
|---|
| 27 | return aux::threading::shared_mutex::try_lock(mtx_);
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 | void shared_timed_mutex::unlock()
|
|---|
| 31 | {
|
|---|
| 32 | aux::threading::shared_mutex::unlock(mtx_);
|
|---|
| 33 | }
|
|---|
| 34 |
|
|---|
| 35 | void shared_timed_mutex::lock_shared()
|
|---|
| 36 | {
|
|---|
| 37 | aux::threading::shared_mutex::lock_shared(mtx_);
|
|---|
| 38 | }
|
|---|
| 39 |
|
|---|
| 40 | bool shared_timed_mutex::try_lock_shared()
|
|---|
| 41 | {
|
|---|
| 42 | return aux::threading::shared_mutex::try_lock_shared(mtx_);
|
|---|
| 43 | }
|
|---|
| 44 |
|
|---|
| 45 | void shared_timed_mutex::unlock_shared()
|
|---|
| 46 | {
|
|---|
| 47 | aux::threading::shared_mutex::unlock_shared(mtx_);
|
|---|
| 48 | }
|
|---|
| 49 |
|
|---|
| 50 | shared_timed_mutex::native_handle_type shared_timed_mutex::native_handle()
|
|---|
| 51 | {
|
|---|
| 52 | return &mtx_;
|
|---|
| 53 | }
|
|---|
| 54 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.