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
52
53
//! Naive implementation for single CPU use.
/// Returns the per-CPU data area size for one CPU.
///
/// Always returns `0` for "sp-naive" use.
/// Returns the number of per-CPU data areas reserved.
///
/// Always returns `1` for "sp-naive" use.
/// Returns the base address of the per-CPU data area on the given CPU.
///
/// Always returns `0` for "sp-naive" use.
/// Reads the architecture-specific per-CPU data register.
///
/// Always returns `0` for "sp-naive" use.
/// Writes the architecture-specific per-CPU data register.
///
/// No effect for "sp-naive" use.
///
/// # Safety
///
/// This function is marked as `unsafe` for consistency with non "sp-naive"
/// implementations.
pub unsafe
/// Initializes the per-CPU data register.
///
/// No effect for "sp-naive" use.
/// Initialize all per-CPU data areas.
///
/// Returns the number of areas initialized.
///
/// For "sp-naive" use it does nothing and returns `1`.