summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/os_posix/os_flock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/os_posix/os_flock.c')
-rw-r--r--src/third_party/wiredtiger/src/os_posix/os_flock.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/third_party/wiredtiger/src/os_posix/os_flock.c b/src/third_party/wiredtiger/src/os_posix/os_flock.c
deleted file mode 100644
index e2056f7636c..00000000000
--- a/src/third_party/wiredtiger/src/os_posix/os_flock.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/*-
- * Copyright (c) 2014-2016 MongoDB, Inc.
- * Copyright (c) 2008-2014 WiredTiger, Inc.
- * All rights reserved.
- *
- * See the file LICENSE for redistribution information.
- */
-
-#include "wt_internal.h"
-
-/*
- * __wt_bytelock --
- * Lock/unlock a byte in a file.
- */
-int
-__wt_bytelock(WT_FH *fhp, wt_off_t byte, bool lock)
-{
- struct flock fl;
- WT_DECL_RET;
-
- /*
- * WiredTiger requires this function be able to acquire locks past
- * the end of file.
- *
- * Note we're using fcntl(2) locking: all fcntl locks associated with a
- * file for a given process are removed when any file descriptor for the
- * file is closed by the process, even if a lock was never requested for
- * that file descriptor.
- */
- fl.l_start = byte;
- fl.l_len = 1;
- fl.l_type = lock ? F_WRLCK : F_UNLCK;
- fl.l_whence = SEEK_SET;
-
- WT_SYSCALL_RETRY(fcntl(fhp->fd, F_SETLK, &fl), ret);
-
- return (ret);
-}