mirror of
https://github.com/sliverarmory/reflektor
synced 2026-08-25 09:14:48 +00:00
16 lines
412 B
Go
16 lines
412 B
Go
//go:build linux && !android && (amd64 || arm64 || ppc64le || riscv64)
|
|
|
|
// SPDX-License-Identifier: MIT
|
|
package linuxmem
|
|
|
|
import "github.com/ebitengine/purego"
|
|
|
|
//go:uintptrescapes
|
|
func callExportFunction(fn uintptr, args ...uintptr) uintptr {
|
|
if len(args) > maxExportArguments {
|
|
panic("validated Linux export argument count is out of range")
|
|
}
|
|
result, _, _ := purego.SyscallN(fn, args...)
|
|
return result
|
|
}
|