Path: blob/main/vendor/golang.org/x/sys/unix/fcntl_darwin.go
2880 views
// Copyright 2019 The Go Authors. All rights reserved.1// Use of this source code is governed by a BSD-style2// license that can be found in the LICENSE file.34package unix56import "unsafe"78// FcntlInt performs a fcntl syscall on fd with the provided command and argument.9func FcntlInt(fd uintptr, cmd, arg int) (int, error) {10return fcntl(int(fd), cmd, arg)11}1213// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.14func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {15_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))16return err17}1819// FcntlFstore performs a fcntl syscall for the F_PREALLOCATE command.20func FcntlFstore(fd uintptr, cmd int, fstore *Fstore_t) error {21_, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(fstore))))22return err23}242526