sysvshm_linux.go 537 B

123456789101112131415161718192021
  1. // Copyright 2021 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. //go:build linux
  5. // +build linux
  6. package unix
  7. import "runtime"
  8. // SysvShmCtl performs control operations on the shared memory segment
  9. // specified by id.
  10. func SysvShmCtl(id, cmd int, desc *SysvShmDesc) (result int, err error) {
  11. if runtime.GOARCH == "arm" ||
  12. runtime.GOARCH == "mips64" || runtime.GOARCH == "mips64le" {
  13. cmd |= ipc_64
  14. }
  15. return shmctl(id, cmd, desc)
  16. }