Skip to content
Merged
8 changes: 8 additions & 0 deletions src/internal/task/task_none_uefi.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//go:build scheduler.none && uefi

package task

//go:export tinygo_task_exit
func taskExit() {
runtimePanic("scheduler is disabled")
}
2 changes: 1 addition & 1 deletion src/internal/task/task_stack_amd64.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build scheduler.tasks && amd64 && !windows
//go:build scheduler.tasks && amd64 && !windows && !uefi

package task

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
//go:build scheduler.tasks && amd64 && windows
//go:build scheduler.tasks && amd64 && (windows || uefi)

package task

// This is almost the same as task_stack_amd64.go, but with the extra rdi and
// rsi registers saved: Windows has a slightly different calling convention.
// rsi registers saved: Windows and UEFI use the Win64 calling convention.

import "unsafe"

Expand Down
4 changes: 0 additions & 4 deletions src/runtime/scheduler_cooperative.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,6 @@ func sleep(duration int64) {
if duration <= 0 {
return
}
if schedulerSleepCustom(duration) {
return
}

addSleepTask(task.Current(), nanosecondsToTicks(duration))
task.Pause()
}
Expand Down
7 changes: 0 additions & 7 deletions src/runtime/sleep_custom_default.go

This file was deleted.

5 changes: 3 additions & 2 deletions targets/uefi-amd64.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"goos": "linux",
"goarch": "amd64",
"gc": "leaking",
"scheduler": "none",
"scheduler": "tasks",
"linker": "ld.lld",
"linker-flavor": "coff",
"libc": "picolibc",
Expand Down Expand Up @@ -35,7 +35,8 @@
"extra-files": [
"src/device/amd64/cpu_amd64.S",
"src/device/uefi/asm_amd64.S",
"src/runtime/asm_amd64_windows.S"
"src/runtime/asm_amd64_windows.S",
"src/internal/task/task_stack_amd64_windows.S"
],
"gdb": ["gdb-multiarch", "gdb"]
}
Loading