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
/* mod.rs
 *
 * Developed by Tim Walls <tim.walls@snowgoons.com>
 * Copyright (c) All Rights Reserved, Tim Walls
 */
//! Concurrency/threading for AVToxide

// Imports ===================================================================
pub mod scheduler;
pub mod thread;
pub mod interrupt;
pub mod sync;
pub mod util;
pub(crate) mod stack;

use avr_oxide::OxideResult;

pub use interrupt::token::Isolated as Isolated;

// Declarations ==============================================================
/// A type alias for the result of a nonblocking locking method.
pub type TryLockResult<Guard> = OxideResult<Guard, TryLockError>;

/// An enumeration of possible errors associated with a [`TryLockResult`] which
/// can occur while trying to acquire a lock.
pub enum TryLockError {
  /// The lock could not be acquired at this time because the operation would
  /// otherwise block.
  WouldBlock,
}


// Code ======================================================================


// Tests =====================================================================