LLDB mainline
SystemLifetimeManager.h
Go to the documentation of this file.
1//===-- SystemLifetimeManager.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_INITIALIZATION_SYSTEMLIFETIMEMANAGER_H
10#define LLDB_INITIALIZATION_SYSTEMLIFETIMEMANAGER_H
11
13#include "llvm/Support/Error.h"
14
15#include <memory>
16#include <mutex>
17
18namespace lldb_private {
19
21public:
24
25 llvm::Error Initialize(std::unique_ptr<SystemInitializer> initializer);
26 void Terminate();
27
28private:
29 std::recursive_mutex m_mutex;
30 std::unique_ptr<SystemInitializer> m_initializer;
31 uint8_t m_initialized = 0;
32 uint8_t m_terminated = 0;
33
34 // Noncopyable.
37};
38}
39
40#endif
SystemLifetimeManager(const SystemLifetimeManager &other)=delete
SystemLifetimeManager & operator=(const SystemLifetimeManager &other)=delete
llvm::Error Initialize(std::unique_ptr< SystemInitializer > initializer)
std::unique_ptr< SystemInitializer > m_initializer
A class that represents a running process on the host machine.