[*] Unix signal handlers shouldn't be Linux exclusive
This commit is contained in:
parent
1c78c18997
commit
9da2147756
@ -9,7 +9,10 @@
|
||||
#include "Exit.hpp"
|
||||
#include <Source/Grug/Grug.hpp>
|
||||
#include "MTWatchDog.hpp"
|
||||
|
||||
#if defined(AURORA_IS_POSIX_DERIVED)
|
||||
#include "Exit.Unix.hpp"
|
||||
#endif
|
||||
|
||||
namespace Aurora::Exit
|
||||
{
|
||||
@ -64,6 +67,7 @@ namespace Aurora::Exit
|
||||
|
||||
static AuUInt32 gProblemCounter = {};
|
||||
|
||||
// Mitigate reused stack, nested try/catch, spam
|
||||
if (level == ETriggerLevel::eProblematicEvent)
|
||||
{
|
||||
if (AuAtomicTestAndSet(&gProblemCounter, 1))
|
||||
@ -101,7 +105,7 @@ namespace Aurora::Exit
|
||||
gHasSentTerminate |= isTerminate;
|
||||
}
|
||||
|
||||
// Force exit after calling the subscribers, should the even level be eSigTerminate
|
||||
// Force exit after calling the subscribers, should the level be eSigTerminate
|
||||
if (level == ETriggerLevel::eSigTerminate)
|
||||
{
|
||||
// HACK:
|
||||
@ -149,14 +153,14 @@ namespace Aurora::Exit
|
||||
gMutex = AuThreadPrimitives::MutexUnique();
|
||||
InitWatchdog();
|
||||
|
||||
#if defined(AURORA_IS_LINUX_DERIVED)
|
||||
#if defined(AURORA_IS_POSIX_DERIVED)
|
||||
InitUnix();
|
||||
#endif
|
||||
}
|
||||
|
||||
void DeinitExit()
|
||||
{
|
||||
#if defined(AURORA_IS_LINUX_DERIVED)
|
||||
#if defined(AURORA_IS_POSIX_DERIVED)
|
||||
DeinitUnix();
|
||||
#endif
|
||||
|
||||
|
@ -121,7 +121,7 @@ namespace Aurora::IO::FS
|
||||
return Loop::ELoopSource::eSourceFileWatcher;
|
||||
}
|
||||
|
||||
// Event type is latching, not a type of binary semaphore
|
||||
// Event type is latching, sort of like binary semaphore
|
||||
// Resignal if work is still available
|
||||
void NTEvent::OnPresleep()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user