AuroraRuntime/Source/Telemetry/Telemetry.cpp

83 lines
1.3 KiB
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Telemetry.cpp
Date: 2021-6-17
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include <Source/Debug/Debug.hpp>
#include "Telemetry.hpp"
namespace Aurora::Telemetry
{
static bool bHasInit {};
static AuThreadPrimitives::CriticalSectionUnique_t gGroupLock;
void BeginBlock()
{
if (!bHasInit) return;
gGroupLock->Lock();
}
void EndBlock()
{
if (!bHasInit) return;
gGroupLock->Unlock();
}
void InsertOSError(const Debug::OSError_t &osError)
{
if (!bHasInit) return;
}
void InsertMsgError(const Debug::LastError &error)
{
if (!bHasInit) return;
}
void InsertCError(AuSInt cError)
{
}
void InsertManualFence(AuUInt32 fence)
{
}
void InsertBackTrace(AuUInt32 fence)
{
}
void Report(Telemetry::NewBlockboxEntry &entry)
{
}
void ReportDyingBreath(Telemetry::NewBlackBoxEntryMinidump &entry)
{
}
void ReportSysInfo()
{
}
void Init()
{
gGroupLock = AuThreadPrimitives::CriticalSectionUnique();
ReportSysInfo();
}
AUKN_SYM void Mayday()
{
Debug::CheckErrors();
Debug::PlatformHandleFatal(false);
}
}