Source File
flock.go
Belonging Package
syscall
// +build linux freebsd openbsd netbsd dragonfly// 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.package syscallimport// fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux// systems by flock_linux_32bit.go to be SYS_FCNTL64.var fcntl64Syscall uintptr = SYS_FCNTL// 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 {return nil}return}