github.com/rafaeltorres324/go/src@v0.0.0-20210519164414-9fdf653a9838/runtime/export_darwin_test.go (about) 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 5 package runtime 6 7 func Fcntl(fd, cmd, arg uintptr) (uintptr, uintptr) { 8 r := fcntl(int32(fd), int32(cmd), int32(arg)) 9 if r < 0 { 10 return ^uintptr(0), uintptr(-r) 11 } 12 return uintptr(r), 0 13 }