diff --git a/src/pkg/syscall/syscall_linux.go b/src/pkg/syscall/syscall_linux.go index 1d6fc76c79d..9fc2605c4b2 100644 --- a/src/pkg/syscall/syscall_linux.go +++ b/src/pkg/syscall/syscall_linux.go @@ -774,6 +774,7 @@ func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (errno int) //sys fcntl(fd int, cmd int, arg int) (val int, errno int) //sys Fdatasync(fd int) (errno int) +//sys Flock(fd int, how int) (errno int) //sys Fsync(fd int) (errno int) //sys Getdents(fd int, buf []byte) (n int, errno int) = SYS_GETDENTS64 //sysnb Getpgid(pid int) (pgid int, errno int) @@ -878,7 +879,6 @@ func Munmap(b []byte) (errno int) { // Fadvise64 // Fgetxattr // Flistxattr -// Flock // Fork // Fremovexattr // Fsetxattr diff --git a/src/pkg/syscall/zsyscall_linux_386.go b/src/pkg/syscall/zsyscall_linux_386.go index 8df29f1367c..4eb522ad922 100644 --- a/src/pkg/syscall/zsyscall_linux_386.go +++ b/src/pkg/syscall/zsyscall_linux_386.go @@ -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) diff --git a/src/pkg/syscall/zsyscall_linux_amd64.go b/src/pkg/syscall/zsyscall_linux_amd64.go index fa20ff57abc..999ed64a181 100644 --- a/src/pkg/syscall/zsyscall_linux_amd64.go +++ b/src/pkg/syscall/zsyscall_linux_amd64.go @@ -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) diff --git a/src/pkg/syscall/zsyscall_linux_arm.go b/src/pkg/syscall/zsyscall_linux_arm.go index 560a65b12ce..cd49dabed6e 100644 --- a/src/pkg/syscall/zsyscall_linux_arm.go +++ b/src/pkg/syscall/zsyscall_linux_arm.go @@ -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)