Skip to content

Commit 931a539

Browse files
committed
refactor(port_std): rewrite the port using the user-mode scheduling abstraction
Not only does this untangle the complexity of scheduling but also paves the way for true preemptive interrupts.
1 parent 00e5846 commit 931a539

File tree

3 files changed

+310
-357
lines changed

3 files changed

+310
-357
lines changed

src/constance_port_std/src/lib.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ This port fully supports [the standard interrupt handling framework].
5252

5353
## Implementation
5454

55-
All interrupt handlers execute in the main thread. Whenever an interrupt is pended or enabled, preemption checking code will run, and under the right condition, will yield the control to the dispatcher.
56-
57-
The dispatcher loop handles top-level interrupts and calls the interrupt handlers directly.
58-
59-
In an interrupt handler, the preemption checking code handles nested interrupts and calls their interrupt handlers.
55+
Based on the internal user-mode scheduling (UMS) framework, we treat interrupt handlers as UMS worker threads, just like tasks and the dispatcher. The user-mode scheduler manages active interrupt threads and favors them over other kinds of threads. (In contrast, the scheduler doesn't manage tasks - it only knows which task is currently chosen by the operating system.)
6056

6157
**To be implemented:** True asynchronous interrupts aren't supported yet.

0 commit comments

Comments
 (0)