1
2
3
4
5
6
7
8
9
10
11
12 package cpu
13
14 import (
15 "syscall"
16 "unsafe"
17 )
18
19
20
21
22
23 type syscallFunc uintptr
24
25 var libc_getsystemcfg syscallFunc
26
27 type errno = syscall.Errno
28
29
30 func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)
31 func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)
32
33 func callgetsystemcfg(label int) (r1 uintptr, e1 errno) {
34 r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsystemcfg)), 1, uintptr(label), 0, 0, 0, 0, 0)
35 return
36 }
37
View as plain text