summaryrefslogtreecommitdiff
path: root/internal/stats/lock_posix.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/stats/lock_posix.go')
-rw-r--r--internal/stats/lock_posix.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/internal/stats/lock_posix.go b/internal/stats/lock_posix.go
deleted file mode 100644
index 2c41d31..0000000
--- a/internal/stats/lock_posix.go
+++ /dev/null
@@ -1,23 +0,0 @@
-//go:build !windows
-
-package stats
-
-import (
- "errors"
-
- "golang.org/x/sys/unix"
-)
-
-func tryLockFile(fd uintptr) error {
- if err := unix.Flock(int(fd), unix.LOCK_EX|unix.LOCK_NB); err != nil {
- if errors.Is(err, unix.EWOULDBLOCK) {
- return errLockWouldBlock
- }
- return err
- }
- return nil
-}
-
-func unlockFile(fd uintptr) error {
- return unix.Flock(int(fd), unix.LOCK_UN)
-}