1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/. */

#![deny(unsafe_code)]

mod allocator;
mod atomic_shared_address;
mod atomic_shared_address_range;
mod object_offset;
mod object_size;
mod shared_address;
mod shared_address_range;
mod shared_box;
mod shared_channel;
mod shared_option;
mod shared_rc;
mod shared_vec;
mod shmem_id;
mod shmem_name;

// All unsafe code lives here
mod unsafe_code;

// Reexport traits.
pub use shared_memory::SharedMemCast;

pub use allocator::get_bootstrap_name;
pub use allocator::set_bootstrap_name;
pub use shared_address_range::SharedAddressRange;
pub use shared_box::SharedBox;
pub use shared_channel::channel;
pub use shared_channel::SharedReceiver;
pub use shared_channel::SharedSender;
pub use shared_option::SharedOption;
pub use shared_rc::SharedRc;
pub use shared_vec::SharedVec;
pub use unsafe_code::SharedMemRef;
pub use unsafe_code::Volatile;

// Should these be publicly exported
pub(crate) use allocator::ShmemAllocator;
pub(crate) use allocator::ALLOCATOR;
pub(crate) use atomic_shared_address::AtomicSharedAddress;
pub(crate) use atomic_shared_address_range::AtomicSharedAddressRange;
pub(crate) use object_offset::ObjectOffset;
pub(crate) use object_size::ObjectSize;
pub(crate) use shared_address::SharedAddress;
pub(crate) use shmem_id::ShmemId;
pub(crate) use shmem_name::ShmemName;
pub(crate) use unsafe_code::SyncSharedMem;