test/smp/cases.rad 1.6 KiB raw
1
//! Shared constants and progress stages for concurrent kernel checks.
2
3
/// Pages in the allocation interrupted by the cancellation checker.
4
export constant ALLOCATION_PAGES: u32 = 4096;
5
/// Completed allocation transactions per user context.
6
export constant TRANSACTIONS: u32 = 16;
7
/// Physical interrupt source injected by the machine runner.
8
export constant IRQ_SOURCE: u32 = 7;
9
/// Token delivered by the remote wakeup check.
10
export constant WAKE_TOKEN: u32 = 0x55;
11
/// Token delivered by the remote timeout check.
12
export constant TIMEOUT_TOKEN: u32 = 0x66;
13
/// Token delivered while a level interrupt remains asserted.
14
export constant STORM_TOKEN: u32 = 0x77;
15
16
/// Handshake between the idle user context and the machine checker.
17
export union WakeStage: Copy {
18
    /// User is about to wait for an explicit wakeup.
19
    BeforeWakeWait = 2,
20
    /// User resumed after its explicit wakeup.
21
    WakeResumed = 3,
22
    /// Checker permits the user to start its timeout wait.
23
    AllowTimeout = 4,
24
    /// User is about to wait for the timeout.
25
    BeforeTimeoutWait = 5,
26
    /// User resumed after its timeout.
27
    TimeoutResumed = 6,
28
    /// Checker permits the user to wait for terminal events.
29
    AllowTerminalWait = 7,
30
    /// User is about to wait for terminal events.
31
    BeforeTerminalWait = 8,
32
    /// User resumed after a terminal event.
33
    TerminalResumed = 9,
34
    /// Checker permits the user to start its large allocation.
35
    AllowAllocation = 10,
36
    /// User is about to allocate pages.
37
    BeforeAllocation = 11,
38
    /// Allocation completed without interruption.
39
    AllocationComplete = 12,
40
}