Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

syscall_aix_ppc64_gc.go 988B

1234567891011121314151617181920212223242526272829303132333435
  1. // Copyright 2019 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // Minimal copy of x/sys/unix so the cpu package can make a
  5. // system call on AIX without depending on x/sys/unix.
  6. // (See golang.org/issue/32102)
  7. //go:build aix && ppc64 && gc
  8. package cpu
  9. import (
  10. "syscall"
  11. "unsafe"
  12. )
  13. //go:cgo_import_dynamic libc_getsystemcfg getsystemcfg "libc.a/shr_64.o"
  14. //go:linkname libc_getsystemcfg libc_getsystemcfg
  15. type syscallFunc uintptr
  16. var libc_getsystemcfg syscallFunc
  17. type errno = syscall.Errno
  18. // Implemented in runtime/syscall_aix.go.
  19. func rawSyscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)
  20. func syscall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err errno)
  21. func callgetsystemcfg(label int) (r1 uintptr, e1 errno) {
  22. r1, _, e1 = syscall6(uintptr(unsafe.Pointer(&libc_getsystemcfg)), 1, uintptr(label), 0, 0, 0, 0, 0)
  23. return
  24. }