pr7.4
This commit is contained in:
@@ -1,39 +1,3 @@
|
||||
# PR-7.4 — YIELD Instruction
|
||||
|
||||
## Briefing
|
||||
|
||||
YIELD voluntarily gives up execution.
|
||||
|
||||
## Target
|
||||
|
||||
Opcode:
|
||||
|
||||
`YIELD`
|
||||
|
||||
Semantics:
|
||||
|
||||
* Current coroutine moves to end of ready queue.
|
||||
* Scheduler selects next coroutine at safepoint.
|
||||
|
||||
Switching must occur only at FRAME_SYNC.
|
||||
|
||||
## Checklist
|
||||
|
||||
* [ ] YIELD opcode implemented.
|
||||
* [ ] Current coroutine enqueued.
|
||||
* [ ] No mid-instruction switching.
|
||||
|
||||
## Tests
|
||||
|
||||
* Two coroutines yielding alternate deterministically.
|
||||
|
||||
## Junie Rules
|
||||
|
||||
You MAY modify VM execution loop.
|
||||
You MUST NOT allow switching outside safepoints.
|
||||
|
||||
---
|
||||
|
||||
# PR-7.5 — SLEEP Instruction
|
||||
|
||||
## Briefing
|
||||
|
||||
Reference in New Issue
Block a user