compiler: add support for atomic operations

This also implements DisableInterrupts/EnableInterrupts for RISC-V, as
those operations were needed to implement a few libcalls.
This commit is contained in:
Ayke van Laethem
2020-05-15 23:24:41 +02:00
committed by Ron Evans
parent 734613c20e
commit fed433c046
10 changed files with 389 additions and 24 deletions
+11
View File
@@ -91,3 +91,14 @@ func ticks() timeUnit
func abort() {
trap()
}
// TinyGo does not yet support any form of parallelism on WebAssembly, so these
// can be left empty.
//go:linkname procPin sync/atomic.runtime_procPin
func procPin() {
}
//go:linkname procUnpin sync/atomic.runtime_procUnpin
func procUnpin() {
}