LLDB  mainline
LockFilePosix.h
Go to the documentation of this file.
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
lldb_private::LockFilePosix::DoReadLock
Status DoReadLock(const uint64_t start, const uint64_t len) override
Definition: LockFilePosix.cpp:48
lldb_private::LockFilePosix::DoTryReadLock
Status DoTryReadLock(const uint64_t start, const uint64_t len) override
Definition: LockFilePosix.cpp:52
lldb_private::LockFilePosix::DoWriteLock
Status DoWriteLock(const uint64_t start, const uint64_t len) override
Definition: LockFilePosix.cpp:40
lldb_private::LockFilePosix::DoUnlock
Status DoUnlock() override
Definition: LockFilePosix.cpp:56
lldb_private::LockFilePosix::~LockFilePosix
~LockFilePosix() override
Definition: LockFilePosix.cpp:38
lldb_private::LockFileBase
Definition: LockFileBase.h:18
lldb_private::LockFilePosix
Definition: LockFilePosix.h:16
lldb_private::LockFilePosix::DoTryWriteLock
Status DoTryWriteLock(const uint64_t start, const uint64_t len) override
Definition: LockFilePosix.cpp:44
LockFileBase.h
lldb_private::Status
Definition: Status.h:44
lldb_private::LockFilePosix::LockFilePosix
LockFilePosix(int fd)
Definition: LockFilePosix.cpp:36
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16