dispenso 1.6.0
A library for task parallelism
Loading...
Searching...
No Matches
rw_lock.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#pragma once
9
16#include <dispenso/detail/rw_lock_impl.h>
17
18namespace dispenso {
19
33class alignas(kCacheLineSize) RWLock : public detail::RWLockImpl {
34 public:
40 using detail::RWLockImpl::lock;
41
47 using detail::RWLockImpl::try_lock;
48
55 using detail::RWLockImpl::unlock;
56
62 using detail::RWLockImpl::lock_shared;
63
71 using detail::RWLockImpl::try_lock_shared;
72
79 using detail::RWLockImpl::unlock_shared;
80
91 using detail::RWLockImpl::lock_upgrade;
92
98 using detail::RWLockImpl::lock_downgrade;
99};
100
107class UnalignedRWLock : public detail::RWLockImpl {};
108
109} // namespace dispenso