LLDB  mainline
LockFileWindows.h
Go to the documentation of this file.
1 //===-- LockFileWindows.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 liblldb_Host_posix_LockFileWindows_h_
10 #define liblldb_Host_posix_LockFileWindows_h_
11 
12 #include "lldb/Host/LockFileBase.h"
14 
15 namespace lldb_private {
16 
17 class LockFileWindows : public LockFileBase {
18 public:
19  explicit LockFileWindows(int fd);
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  bool IsValidFile() const override;
34 
35 private:
36  HANDLE m_file;
37 };
38 
39 } // namespace lldb_private
40 
41 #endif // liblldb_Host_posix_LockFileWindows_h_
lldb_private::LockFileWindows::DoReadLock
Status DoReadLock(const uint64_t start, const uint64_t len) override
Definition: LockFileWindows.cpp:53
lldb_private::LockFileWindows::DoUnlock
Status DoUnlock() override
Definition: LockFileWindows.cpp:62
lldb_private::LockFileWindows::m_file
HANDLE m_file
Definition: LockFileWindows.h:36
lldb_private::LockFileWindows::DoTryWriteLock
Status DoTryWriteLock(const uint64_t start, const uint64_t len) override
Definition: LockFileWindows.cpp:47
lldb_private::LockFileWindows::DoWriteLock
Status DoWriteLock(const uint64_t start, const uint64_t len) override
Definition: LockFileWindows.cpp:43
lldb_private::LockFileBase
Definition: LockFileBase.h:18
lldb_private::LockFileWindows::DoTryReadLock
Status DoTryReadLock(const uint64_t start, const uint64_t len) override
Definition: LockFileWindows.cpp:57
LockFileBase.h
lldb_private::Status
Definition: Status.h:44
windows.h
lldb_private::LockFileWindows
Definition: LockFileWindows.h:17
lldb_private::LockFileWindows::~LockFileWindows
~LockFileWindows()
Definition: LockFileWindows.cpp:37
lldb_private::LockFileWindows::IsValidFile
bool IsValidFile() const override
Definition: LockFileWindows.cpp:39
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::LockFileWindows::LockFileWindows
LockFileWindows(int fd)
Definition: LockFileWindows.cpp:34