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.
9 // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
10 func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
11 return fcntl(int(fd), cmd, arg)
14 // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
15 func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
16 _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))