diff options
| author | Per Larsson <[email protected]> | 2021-09-16 21:19:14 +0200 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2021-09-16 21:19:14 +0200 |
| commit | cae9f697a13840eb87cb9f6fc32eb80e3a65b29a (patch) | |
| tree | 721af351316d5a1fe2ac022fad2a4e9017b043ae /zenutil/include | |
| parent | zcache - minor cleanup. (diff) | |
| parent | Merge branch 'main' of https://github.com/EpicGames/zen (diff) | |
| download | zen-cae9f697a13840eb87cb9f6fc32eb80e3a65b29a.tar.xz zen-cae9f697a13840eb87cb9f6fc32eb80e3a65b29a.zip | |
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'zenutil/include')
| -rw-r--r-- | zenutil/include/zenserverprocess.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/zenutil/include/zenserverprocess.h b/zenutil/include/zenserverprocess.h index 7b41c8aba..b659f6e58 100644 --- a/zenutil/include/zenserverprocess.h +++ b/zenutil/include/zenserverprocess.h @@ -10,6 +10,7 @@ #include <atomic> #include <filesystem> +#include <optional> class ZenServerEnvironment { @@ -44,6 +45,9 @@ struct ZenServerInstance [[nodiscard]] bool WaitUntilReady(int Timeout); void EnableTermination() { m_Terminate = true; } void EnableMesh() { m_MeshEnabled = true; } + void Detach(); + inline int GetPid() { return m_Process.Pid(); } + inline void SetOwnerPid(int Pid) { m_OwnerPid = Pid; } void SetTestDir(std::filesystem::path TestDir) { @@ -66,6 +70,7 @@ private: std::filesystem::path m_TestDir; bool m_MeshEnabled = false; int m_BasePort = 0; + std::optional<int> m_OwnerPid; void CreateShutdownEvent(int BasePort); }; @@ -90,7 +95,9 @@ public: std::atomic<uint16_t> ListenPort; std::atomic<uint16_t> Flags; uint8_t SessionId[12]; + std::atomic<uint32_t> SponsorPids[32]; uint8_t Padding[12]; + uint8_t Padding2[96]; enum class FlagsEnum : uint16_t { @@ -101,9 +108,10 @@ public: void Reset(); void SignalShutdownRequest(); + bool AddSponsorProcess(uint32_t Pid); }; - static_assert(sizeof(ZenServerEntry) == 32); + static_assert(sizeof(ZenServerEntry) == 256); void Initialize(); [[nodiscard]] bool InitializeReadOnly(); @@ -115,6 +123,6 @@ public: private: void* m_hMapFile = nullptr; ZenServerEntry* m_Data; - int m_MaxEntryCount = 4096 / sizeof(ZenServerEntry); + int m_MaxEntryCount = 131072 / sizeof(ZenServerEntry); ZenServerEntry* m_OurEntry = nullptr; }; |