mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
syscall: add Flock on Linux
Fixes #2069. R=golang-dev, r CC=golang-dev https://golang.org/cl/4703048
This commit is contained in:
parent
a16baf0777
commit
aebfd63cd9
4 changed files with 25 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue