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
//! Partial port of `UnsupportedMachine.c` — the fallback per-host `Machine`.
//!
//! Ported here (operate on the base [`Machine`], so no unported substrate
//! is needed):
//! - `Machine_isCPUonline` (`UnsupportedMachine.c:36`)
//! - `Machine_getCPUPhysicalCoreID` (`UnsupportedMachine.c:56`)
//! - `Machine_getCPUThreadIndex` (`UnsupportedMachine.c:62`)
//!
//! Still `todo!()` and blocked on unported substrate:
//! - `Machine_new` / `Machine_delete` need `Machine_init` / `Machine_done`
//! (still stubs in `machine.rs`) and the `UnsupportedMachine` struct.
//! - `Machine_scan` writes `UnsupportedMachine.usedMem` / `.cachedMem`, so it
//! needs that struct modeled.
use crateMachine;
/// TODO: port of `Machine* Machine_new(UsersTable* usersTable, uid_t userId)`
/// from `UnsupportedMachine.c:18`. Blocked: needs `Machine_init` (stub in
/// `machine.rs`) and the `UnsupportedMachine` struct.
/// TODO: port of `void Machine_delete(Machine* super)` from
/// `UnsupportedMachine.c:30`. Blocked: needs `Machine_done` (stub in
/// `machine.rs`) and the `UnsupportedMachine` struct.
/// Port of `bool Machine_isCPUonline(const Machine* host, unsigned int id)`
/// (`UnsupportedMachine.c:36`). The fallback platform always reports online.
/// TODO: port of `void Machine_scan(Machine* super)` from
/// `UnsupportedMachine.c:44`. Blocked: writes `UnsupportedMachine.usedMem` /
/// `.cachedMem`, so it needs that struct modeled.
/// Port of `int Machine_getCPUPhysicalCoreID(const Machine* host, unsigned int
/// id)` (`UnsupportedMachine.c:56`).
/// Port of `int Machine_getCPUThreadIndex(const Machine* host, unsigned int
/// id)` (`UnsupportedMachine.c:62`).