From 29d601883b13f6c468c8cd0780e98d84d6691b94 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Sat, 18 Aug 2018 20:06:59 +0200 Subject: [PATCH] Implement dummy GOMAXPROCS This compiler targets single-core machines, GOMAXPROCS is thus fixed to 1. --- src/runtime/runtime.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/runtime/runtime.go b/src/runtime/runtime.go index fad61fed..1e2c910a 100644 --- a/src/runtime/runtime.go +++ b/src/runtime/runtime.go @@ -12,6 +12,11 @@ func Sleep(d Duration) { sleep(d) } +func GOMAXPROCS(n int) int { + // Note: setting GOMAXPROCS is ignored. + return 1 +} + func _panic(message interface{}) { printstring("panic: ") printitf(message)