Flutter Engine
The Flutter Engine
shared_mutex_posix.cc
Go to the documentation of this file.
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/platform/posix/shared_mutex_posix.h"
6
7#include "flutter/fml/logging.h"
8
9namespace fml {
10
12 return new SharedMutexPosix();
13}
14
15SharedMutexPosix::SharedMutexPosix() {
16 FML_CHECK(pthread_rwlock_init(&rwlock_, nullptr) == 0);
17}
18
20 pthread_rwlock_wrlock(&rwlock_);
21}
22
24 pthread_rwlock_rdlock(&rwlock_);
25}
26
28 pthread_rwlock_unlock(&rwlock_);
29}
30
32 pthread_rwlock_unlock(&rwlock_);
33}
34
35} // namespace fml
static SharedMutex * Create()
#define FML_CHECK(condition)
Definition: logging.h:85
Definition: ascii_trie.cc:9