]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Host/posix/LockFilePosix.h
Merge ^/head r338690 through r338730.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Host / posix / LockFilePosix.h
1 //===-- LockFilePosix.h -----------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_Host_posix_LockFilePosix_h_
11 #define liblldb_Host_posix_LockFilePosix_h_
12
13 #include "lldb/Host/LockFileBase.h"
14
15 namespace lldb_private {
16
17 class LockFilePosix : public LockFileBase {
18 public:
19   explicit LockFilePosix(int fd);
20   ~LockFilePosix() override;
21
22 protected:
23   Status DoWriteLock(const uint64_t start, const uint64_t len) override;
24
25   Status DoTryWriteLock(const uint64_t start, const uint64_t len) override;
26
27   Status DoReadLock(const uint64_t start, const uint64_t len) override;
28
29   Status DoTryReadLock(const uint64_t start, const uint64_t len) override;
30
31   Status DoUnlock() override;
32 };
33
34 } // namespace lldb_private
35
36 #endif // liblldb_Host_posix_LockFilePosix_h_