[*] Partially remove WOA_STRICTER_FIFO (its not ready yet) and fix debug crash

This commit is contained in:
Reece Wilson 2024-11-24 05:05:02 +00:00
parent 6ac47bccf9
commit 66613c1229
2 changed files with 5 additions and 20 deletions

View File

@ -331,7 +331,10 @@ namespace Aurora::Debug
{
auto pMessage = AuMakeSharedThrow<ThreadMessage>();
pMessage->uDebugBuildSourceLineHint = uLine;
pMessage->pStringMessage = AuMakeSharedThrow<AuString>(msg);
if (msg)
{
pMessage->pStringMessage = AuMakeSharedThrow<AuString>(msg);
}
pMessage->eFailureCategory = category;
PushErrorStackInternal(pMessage);
}

View File

@ -24,6 +24,7 @@
// > lock barriers turn into full lock guards,
// > and every sleep will require a condvar or semaphore wakeup.
// Every perf trick will be bypassed.
// Update: partially removed. its not ready yet
//#define WOA_STRICTER_FIFO
namespace Aurora::Threading
@ -129,24 +130,20 @@ namespace Aurora::Threading
if (state.qwNanosecondsAbs)
{
#if !defined(WOA_STRICTER_FIFO)
if (!WaitBuffer::Compare2<eMethod, true>(this->pAddress, this->uSize, state.compare.buffer, state.uDownsizeMask))
{
return true;
}
#endif
auto uNow = AuTime::SteadyClockNS();
auto uEndTime = state.qwNanosecondsAbs.value();
while (uNow < uEndTime)
{
#if !defined(WOA_STRICTER_FIFO)
if (!WaitBuffer::Compare2<eMethod, true>(this->pAddress, this->uSize, state.compare.buffer, state.uDownsizeMask))
{
return true;
}
#endif
#if defined(AURORA_PLATFORM_WIN32)
Win32DropSchedulerResolution();
@ -182,14 +179,6 @@ namespace Aurora::Threading
#endif
}
#if defined(WOA_STRICTER_FIFO)
if (!WaitBuffer::Compare2<eMethod, true>(this->pAddress, this->uSize, state.compare.buffer, state.uDownsizeMask))
{
return true;
}
#endif
uNow = AuTime::SteadyClockNS();
}
@ -197,11 +186,7 @@ namespace Aurora::Threading
}
else
{
#if !defined(WOA_STRICTER_FIFO)
while (WaitBuffer::Compare2<eMethod, true>(this->pAddress, this->uSize, state.compare.buffer, state.uDownsizeMask))
#else
do
#endif
{
if (!AuAtomicLoad(&this->bAlive))
{
@ -224,9 +209,6 @@ namespace Aurora::Threading
#endif
}
}
#if defined(WOA_STRICTER_FIFO)
while (WaitBuffer::Compare2<eMethod, true>(this->pAddress, this->uSize, state.compare.buffer, state.uDownsizeMask));
#endif
return true;
}