fuchsia_sync/
lib.rs

1// Copyright 2023 The Fuchsia 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//! Fuchsia-native synchronization primitives.
6
7#[cfg(target_os = "fuchsia")]
8mod condvar;
9#[cfg(target_os = "fuchsia")]
10mod mutex;
11#[cfg(target_os = "fuchsia")]
12mod rwlock;
13
14#[cfg(target_os = "fuchsia")]
15pub use condvar::*;
16#[cfg(target_os = "fuchsia")]
17pub use mutex::*;
18#[cfg(target_os = "fuchsia")]
19pub use rwlock::*;
20
21#[cfg(not(target_os = "fuchsia"))]
22pub use parking_lot::{
23    Condvar, MappedMutexGuard, MappedRwLockReadGuard, MappedRwLockWriteGuard, Mutex, MutexGuard,
24    RawMutex as RawSyncMutex, RawRwLock as RawSyncRwLock, RwLock, RwLockReadGuard,
25    RwLockWriteGuard,
26};