aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/runtime/arch_tinygoriscv.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/arch_tinygoriscv.go')
-rw-r--r--src/runtime/arch_tinygoriscv.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/arch_tinygoriscv.go b/src/runtime/arch_tinygoriscv.go
index 0d376c48b..921c775a5 100644
--- a/src/runtime/arch_tinygoriscv.go
+++ b/src/runtime/arch_tinygoriscv.go
@@ -36,7 +36,7 @@ func procUnpin() {
func waitForEvents() {
mask := riscv.DisableInterrupts()
- if !runqueue.Empty() {
+ if runqueue := schedulerRunQueue(); runqueue == nil || !runqueue.Empty() {
riscv.Asm("wfi")
}
riscv.EnableInterrupts(mask)