1 | // Copyright 2013 The Flutter Authors. All rights reserved. |
---|---|
2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. |
4 | |
5 | #include "flutter/fml/synchronization/shared_mutex_std.h" |
6 | |
7 | namespace fml { |
8 | |
9 | SharedMutex* SharedMutex::Create() { |
10 | return new SharedMutexStd(); |
11 | } |
12 | |
13 | void SharedMutexStd::Lock() { |
14 | mutex_.lock(); |
15 | } |
16 | |
17 | void SharedMutexStd::LockShared() { |
18 | mutex_.lock_shared(); |
19 | } |
20 | |
21 | void SharedMutexStd::Unlock() { |
22 | mutex_.unlock(); |
23 | } |
24 | |
25 | void SharedMutexStd::UnlockShared() { |
26 | mutex_.unlock_shared(); |
27 | } |
28 | |
29 | } // namespace fml |
30 |