Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:48

0001 //===-- LockFileWindows.h ---------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef liblldb_Host_posix_LockFileWindows_h_
0010 #define liblldb_Host_posix_LockFileWindows_h_
0011 
0012 #include "lldb/Host/LockFileBase.h"
0013 #include "lldb/Host/windows/windows.h"
0014 
0015 namespace lldb_private {
0016 
0017 class LockFileWindows : public LockFileBase {
0018 public:
0019   explicit LockFileWindows(int fd);
0020   ~LockFileWindows();
0021 
0022 protected:
0023   Status DoWriteLock(const uint64_t start, const uint64_t len) override;
0024 
0025   Status DoTryWriteLock(const uint64_t start, const uint64_t len) override;
0026 
0027   Status DoReadLock(const uint64_t start, const uint64_t len) override;
0028 
0029   Status DoTryReadLock(const uint64_t start, const uint64_t len) override;
0030 
0031   Status DoUnlock() override;
0032 
0033   bool IsValidFile() const override;
0034 
0035 private:
0036   HANDLE m_file;
0037 };
0038 
0039 } // namespace lldb_private
0040 
0041 #endif // liblldb_Host_posix_LockFileWindows_h_