aboutsummaryrefslogtreecommitdiffhomepage
path: root/main_test.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2022-01-01 22:54:29 +0100
committerAyke <[email protected]>2022-01-02 19:41:44 +0100
commitfcd88356dbef8c77b5ba4c3cd387955d01e58013 (patch)
tree8e620b93bee28691f3d2f8b8d6aeda167ae4ec02 /main_test.go
parente536676a678ec5a65c36dae95575c0885cdfa8b9 (diff)
downloadtinygo-fcd88356dbef8c77b5ba4c3cd387955d01e58013.tar.gz
tinygo-fcd88356dbef8c77b5ba4c3cd387955d01e58013.zip
avr: fix time.Sleep() in init code
In the early days of TinyGo, the idea of `postinit` was to enable interrupts only after initializers have run. Which kind of makes sense... except that `time.Sleep` is allowed in init code and `time.Sleep` requires interrupts to be enabled. Therefore, interrupts must be enabled while initializers are being run. This commit simply moves the enabling of interrupts to a point right before running package initializers. It also removes `runtime.postinit`, which is not necessary anymore (and was only used on AVR).
Diffstat (limited to 'main_test.go')
-rw-r--r--main_test.go3
1 files changed, 0 insertions, 3 deletions
diff --git a/main_test.go b/main_test.go
index 58ad63b99..607f109ba 100644
--- a/main_test.go
+++ b/main_test.go
@@ -171,9 +171,6 @@ func TestCompiler(t *testing.T) {
case "float.go", "math.go", "print.go":
// Stuck in runtime.printfloat64.
- case "goroutines.go":
- // The main() never runs.
-
case "interface.go":
// Several comparison tests fail.