runntime/interrupt.Checkpoint: add warning that this is hard to use

Realized this while looking through the code: there is no way to use
this safely when the scheduler is involved. It can only be used safely
with a `wfe` or similar (part of scheduler code).
This commit is contained in:
Ayke van Laethem
2026-05-25 17:50:08 +02:00
committed by Ayke
parent d348d8b4cf
commit 7a5a50d949
+4
View File
@@ -20,6 +20,10 @@ package interrupt
// if c.Saved() {
// c.Jump()
// }
//
// Warning: only use this in special runtime code! If it is used from a normal
// goroutine, and the scheduler switches to a different goroutine, havoc will
// ensure.
type Checkpoint struct {
jumpSP uintptr
jumpPC uintptr