syscall: rename method Flock_t.Lock to func FcntlFlock

Update #7059

R=rsc
CC=golang-codereviews
https://golang.org/cl/55370043
This commit is contained in:
Brad Fitzpatrick 2014-01-21 16:27:39 -08:00
parent 5d3033c590
commit 367ad4534f
1 changed files with 2 additions and 2 deletions

View File

@ -12,8 +12,8 @@ import "unsafe"
// systems by flock_linux_32bit.go to be SYS_FCNTL64.
var fcntl64Syscall uintptr = SYS_FCNTL
// Lock performs a fcntl syscall for F_GETLK, F_SETLK or F_SETLKW commands.
func (lk *Flock_t) Lock(fd uintptr, cmd int) error {
// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
_, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
if errno == 0 {
return nil