mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 07:23:39 +00:00
nintendoswitch: Add dynamic loader for runtime loading PIE sections
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
package runtime
|
||||
|
||||
import "unsafe"
|
||||
|
||||
type timeUnit int64
|
||||
|
||||
const asyncScheduler = false
|
||||
@@ -60,6 +62,16 @@ func abort() {
|
||||
}
|
||||
}
|
||||
|
||||
//export write
|
||||
func write(fd int32, buf *byte, count int) int {
|
||||
// TODO: Proper handling write
|
||||
for i := 0; i < count; i++ {
|
||||
putchar(*buf)
|
||||
buf = (*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(buf)) + 1))
|
||||
}
|
||||
return count
|
||||
}
|
||||
|
||||
//export sleepThread
|
||||
func sleepThread(nanos uint64)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user