syscall: add Flock on Linux

Fixes #2069.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4703048
This commit is contained in:
Russ Cox 2011-07-13 15:34:36 -07:00
parent a16baf0777
commit aebfd63cd9
4 changed files with 25 additions and 1 deletions

View file

@ -277,6 +277,14 @@ func Fdatasync(fd int) (errno int) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (errno int) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
errno = int(e1)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (errno int) {
_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
errno = int(e1)