1 //===-- LockFilePosix.h -----------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_Host_posix_LockFilePosix_h_
10 #define liblldb_Host_posix_LockFilePosix_h_
12 #include "lldb/Host/LockFileBase.h"
14 namespace lldb_private {
16 class LockFilePosix : public LockFileBase {
18 explicit LockFilePosix(int fd);
19 ~LockFilePosix() override;
22 Status DoWriteLock(const uint64_t start, const uint64_t len) override;
24 Status DoTryWriteLock(const uint64_t start, const uint64_t len) override;
26 Status DoReadLock(const uint64_t start, const uint64_t len) override;
28 Status DoTryReadLock(const uint64_t start, const uint64_t len) override;
30 Status DoUnlock() override;
33 } // namespace lldb_private
35 #endif // liblldb_Host_posix_LockFilePosix_h_