1 | //===-- LockFilePosix.h -----------------------------------------*- C++ -*-===// |
---|---|
2 | // |
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 |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef LLDB_HOST_POSIX_LOCKFILEPOSIX_H |
10 | #define LLDB_HOST_POSIX_LOCKFILEPOSIX_H |
11 | |
12 | #include "lldb/Host/LockFileBase.h" |
13 | |
14 | namespace lldb_private { |
15 | |
16 | class LockFilePosix : public LockFileBase { |
17 | public: |
18 | explicit LockFilePosix(int fd); |
19 | ~LockFilePosix() override; |
20 | |
21 | protected: |
22 | Status DoWriteLock(const uint64_t start, const uint64_t len) override; |
23 | |
24 | Status DoTryWriteLock(const uint64_t start, const uint64_t len) override; |
25 | |
26 | Status DoReadLock(const uint64_t start, const uint64_t len) override; |
27 | |
28 | Status DoTryReadLock(const uint64_t start, const uint64_t len) override; |
29 | |
30 | Status DoUnlock() override; |
31 | }; |
32 | |
33 | } // namespace lldb_private |
34 | |
35 | #endif // LLDB_HOST_POSIX_LOCKFILEPOSIX_H |
36 |