mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 03:27:48 +00:00
runtime: add exportedFuncPtr
This function isn't used yet, but will be used for the "cores" scheduler for RISC-V.
This commit is contained in:
committed by
Ron Evans
parent
525c41bac9
commit
64a30424da
@@ -63,6 +63,11 @@ func strlen(ptr unsafe.Pointer) uintptr
|
||||
//export malloc
|
||||
func malloc(size uintptr) unsafe.Pointer
|
||||
|
||||
// Return the address of an exported function.
|
||||
// This is mainly useful to pass a function pointer without extra context
|
||||
// parameter to C, for example.
|
||||
func exportedFuncPtr(fn func()) uintptr
|
||||
|
||||
// Compare two same-size buffers for equality.
|
||||
func memequal(x, y unsafe.Pointer, n uintptr) bool {
|
||||
for i := uintptr(0); i < n; i++ {
|
||||
|
||||
Reference in New Issue
Block a user