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 file is part of libfringe, a low-level green threading library.
// Copyright (c) edef <edef@edef.eu>
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.
//! libfringe is a library implementing safe, lightweight context switches,
//! without relying on kernel services. It can be used in hosted environments
//! (using `std`) as well as on bare metal (using `core`).
//!
//! It provides the following safe abstractions:
//!
//! * an implementation of generators,
//! [Generator](generator/struct.Generator.html).
//!
//! It also provides the necessary low-level building blocks:
//!
//! * a trait that can be implemented by stack allocators,
//! [Stack](struct.Stack.html);
//! * a wrapper for using slice references as stacks,
//! [SliceStack](struct.SliceStack.html);
//! * a stack allocator based on `Box<[u8]>`,
//! [OwnedStack](struct.OwnedStack.html);
//! * a stack allocator based on anonymous memory mappings with guard pages,
//! [OsStack](struct.OsStack.html).
extern crate std;
extern crate alloc;
pub use *;
pub use Generator;
/// Minimum alignment of a stack base address on the target platform.
pub const STACK_ALIGNMENT: usize = STACK_ALIGNMENT;