Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
fml
platform
posix
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
9
namespace
fml
{
10
11
SharedMutex
*
SharedMutex::Create
() {
12
return
new
SharedMutexPosix
();
13
}
14
15
SharedMutexPosix::SharedMutexPosix() {
16
FML_CHECK
(pthread_rwlock_init(&rwlock_,
nullptr
) == 0);
17
}
18
19
void
SharedMutexPosix::Lock
() {
20
pthread_rwlock_wrlock(&rwlock_);
21
}
22
23
void
SharedMutexPosix::LockShared
() {
24
pthread_rwlock_rdlock(&rwlock_);
25
}
26
27
void
SharedMutexPosix::Unlock
() {
28
pthread_rwlock_unlock(&rwlock_);
29
}
30
31
void
SharedMutexPosix::UnlockShared
() {
32
pthread_rwlock_unlock(&rwlock_);
33
}
34
35
}
// namespace fml
fml::SharedMutexPosix
Definition
shared_mutex_posix.h:14
fml::SharedMutexPosix::Lock
virtual void Lock()
Definition
shared_mutex_posix.cc:19
fml::SharedMutexPosix::Unlock
virtual void Unlock()
Definition
shared_mutex_posix.cc:27
fml::SharedMutexPosix::LockShared
virtual void LockShared()
Definition
shared_mutex_posix.cc:23
fml::SharedMutexPosix::UnlockShared
virtual void UnlockShared()
Definition
shared_mutex_posix.cc:31
fml::SharedMutex
Definition
shared_mutex.h:11
fml::SharedMutex::Create
static SharedMutex * Create()
Definition
shared_mutex_posix.cc:11
FML_CHECK
#define FML_CHECK(condition)
Definition
logging.h:85
fml
Definition
ascii_trie.cc:9
Generated on Fri Apr 26 2024 06:14:06 for Flutter Engine by
1.9.8