Tier1: add utlhash

Core SourceSDK type.
This commit is contained in:
Kawe Mazidjatari 2024-04-03 18:55:27 +02:00
parent 250fd504af
commit 7a24371f64
2 changed files with 1331 additions and 0 deletions

View File

@ -161,6 +161,38 @@ template<class T> inline void AssertValidReadWritePtr(T* /*ptr*/, int count = 1)
#define AssertValidThis()
#endif
//-----------------------------------------------------------------------------
// Macro to protect functions that are not reentrant
#ifdef _DEBUG
class CReentryGuard
{
public:
CReentryGuard(int* pSemaphore)
: m_pSemaphore(pSemaphore)
{
++(*m_pSemaphore);
}
~CReentryGuard()
{
--(*m_pSemaphore);
}
private:
int* m_pSemaphore;
};
#define ASSERT_NO_REENTRY() \
static int fSemaphore##__LINE__; \
Assert( !fSemaphore##__LINE__ ); \
CReentryGuard ReentryGuard##__LINE__( &fSemaphore##__LINE__ )
#else
#define ASSERT_NO_REENTRY()
#endif
#define AssertMsg(condition, ...) assert(condition)
typedef void (*CoreMsgVCallbackSink_t)(LogType_t logType, LogLevel_t logLevel, eDLL_T context,
const char* pszLogger, const char* pszFormat, va_list args, const UINT exitCode, const char* pszUptimeOverride);

1299
r5dev/public/tier1/utlhash.h Normal file

File diff suppressed because it is too large Load Diff