rumtime: implement __sync libcalls as critical sections

This change implements __sync atomic polyfill libcalls by disabling interrupts.
This was previously done in a limited capacity on some targets, but this change uses a go:generate to emit all of the calls on all microcontroller targets.
This commit is contained in:
Nia Waldvogel
2021-11-22 18:01:50 -05:00
committed by Ayke
parent 8bd39d2fc2
commit 9fa667ce63
5 changed files with 472 additions and 171 deletions
+2
View File
@@ -4,6 +4,8 @@ import (
"unsafe"
)
//go:generate go run ../../tools/gen-critical-atomics -out ./atomics_critical.go
const Compiler = "tinygo"
// The compiler will fill this with calls to the initialization function of each