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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! Naive implementation for single CPU use.
use crateInitError;
/// Returns the per-CPU data area size for one CPU.
///
/// Always returns `0` for "sp-naive" use.
/// Returns the per-CPU data area size for the given number of CPUs.
///
/// Always returns `0` for "sp-naive" mode since no per-CPU memory areas are needed.
/// 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 per-CPU data areas.
///
/// For "sp-naive" mode, no initialization is needed since per-CPU data is stored
/// in global variables. Always returns `1`.
///
/// Returns the number of areas initialized.
/// Initialize per-CPU data areas with user-provided memory.
///
/// For "sp-naive" mode, parameters are ignored since per-CPU data is stored
/// in global variables. Always returns `1`.
///
/// # Arguments
/// - `_base`: Base address (ignored)
/// - `_cpu_count`: Number of CPUs (ignored)
///
/// Returns the number of areas initialized.