[*] Win32 build regression (1/2)

This commit is contained in:
Reece Wilson 2022-04-10 17:18:21 +01:00
parent e888c0af63
commit 2b798bde97
4 changed files with 10 additions and 14 deletions

View File

@ -143,6 +143,8 @@ namespace Aurora::HWInfo
}
}
}
return true;
}
void SetCpuTopologyNT()

View File

@ -84,14 +84,14 @@ namespace Aurora::IO::FS
struct NTWatcher : IWatcher
{
virtual bool WatchRequest(const WatchRequest &file) override;
virtual bool AddWatch(const WatchRequest &file) override;
virtual bool RemoveByName(const AuString &path) override;
virtual bool RemoveByPrivateContext(const AuSPtr<UserWatchData> &file) override;
virtual AuSPtr<Loop::ILoopSource> AsLoopSource() override;
virtual AuList<WatchEvent> QueryUpdates() override;
virtual AuList<WatchEvent> QueryUpdates() override;
bool Init();
bool GoBrr();
@ -181,10 +181,7 @@ namespace Aurora::IO::FS
if (hFile != INVALID_HANDLE_VALUE)
{
if (!GetFileTime(hFile, NULL, NULL, &this->lastFileTime))
{
return true;
}
GetFileTime(hFile, NULL, NULL, &this->lastFileTime);
CloseHandle(hFile);
}
@ -579,7 +576,7 @@ namespace Aurora::IO::FS
AuList<WatchEvent> NTWatcher::NTWatcher::QueryUpdates()
{
AU_LOCK_GUARD(this->spinlock_);
AsLoopSource().IsSignaled(); // nonblocking, wont latch
AsLoopSource()->IsSignaled(); // poke work queue
return AuExchange(this->triggered_, {});
}

View File

@ -31,7 +31,7 @@ namespace Aurora::Loop
virtual bool Commit() override;
bool IsSignaled() override;
bool IsSignaledPeek() override;
bool WaitAll(AuUInt32 timeout) override;
AuUInt32 WaitAny(AuUInt32 timeout) override;

View File

@ -755,11 +755,6 @@ namespace Aurora::Threading::Threads
return;
}
if (mask.CpuBitCount() == 0)
{
mask = AuHwInfo::GetCPUInfo().maskAllCores;
}
if ((AuBuild::kCurrentPlatform != AuBuild::EPlatform::ePlatformWin32) || (AuSwInfo::IsWindows10OrGreater()))
{
static BOOL(WINAPI * SetThreadSelectedCpuSets_f)(HANDLE, const ULONG *, ULONG);
@ -768,7 +763,9 @@ namespace Aurora::Threading::Threads
SetThreadSelectedCpuSets_f = AuReinterpretCast<decltype(SetThreadSelectedCpuSets_f)>(GetProcAddress(GetModuleHandleW(L"Kernel32.dll"), "SetThreadSelectedCpuSets"));
}
auto sets = mask.ToCpuSets();
auto sets = mask.CpuBitCount() ?
mask.ToCpuSets() :
AuHwInfo::GetCPUInfo().maskAllCores.ToCpuSets();
if (SetThreadSelectedCpuSets_f)
{