summaryrefslogtreecommitdiff
path: root/utils/common/vmpi_tools_shared.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/common/vmpi_tools_shared.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'utils/common/vmpi_tools_shared.h')
-rw-r--r--utils/common/vmpi_tools_shared.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/utils/common/vmpi_tools_shared.h b/utils/common/vmpi_tools_shared.h
new file mode 100644
index 0000000..980552e
--- /dev/null
+++ b/utils/common/vmpi_tools_shared.h
@@ -0,0 +1,45 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#ifndef VMPI_TOOLS_SHARED_H
+#define VMPI_TOOLS_SHARED_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+
+// Packet IDs.
+ #define VMPI_SUBPACKETID_DIRECTORIES 0 // qdir directories.
+ #define VMPI_SUBPACKETID_DBINFO 1 // MySQL database info.
+ #define VMPI_SUBPACKETID_CRASH 3 // A worker saying it crashed.
+ #define VMPI_SUBPACKETID_MULTICAST_ADDR 4 // Filesystem multicast address.
+
+
+class CDBInfo;
+class CIPAddr;
+
+
+// Send/receive the qdir info.
+void SendQDirInfo();
+void RecvQDirInfo();
+
+void SendDBInfo( const CDBInfo *pInfo, unsigned long jobPrimaryID );
+void RecvDBInfo( CDBInfo *pInfo, unsigned long *pJobPrimaryID );
+
+void SendMulticastIP( const CIPAddr *pAddr );
+void RecvMulticastIP( CIPAddr *pAddr );
+
+void VMPI_HandleCrash( const char *pMessage, void *pvExceptionInfo, bool bAssert );
+
+// Call this from an exception handler (set by SetUnhandledExceptionHandler).
+// uCode = ExceptionInfo->ExceptionRecord->ExceptionCode.
+// pvExceptionInfo = ExceptionInfo
+void VMPI_ExceptionFilter( unsigned long uCode, void *pvExceptionInfo );
+
+void HandleMPIDisconnect( int procID, const char *pReason );
+
+
+#endif // VMPI_TOOLS_SHARED_H