// Copyright 2014 The Go Authors. All rights reserved.// Use of this source code is governed by a BSD-style// license that can be found in the LICENSE file.//go:build dragonfly || freebsd || linux || netbsd || openbsd// +build dragonfly freebsd linux netbsd openbsdpackage uniximport// fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux// systems by fcntl_linux_32bit.go to be SYS_FCNTL64.var fcntl64Syscall uintptr = SYS_FCNTLfunc fcntl( int, , int) (int, error) { , , := Syscall(fcntl64Syscall, uintptr(), uintptr(), uintptr())varerrorif != 0 { = }returnint(), }// FcntlInt performs a fcntl syscall on fd with the provided command and argument.func ( uintptr, , int) (int, error) {returnfcntl(int(), , )}// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.func ( uintptr, int, *Flock_t) error { , , := Syscall(fcntl64Syscall, , uintptr(), uintptr(unsafe.Pointer()))if == 0 {returnnil }return}
The pages are generated with Goldsv0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.