Reece
e5e36bd887
[*] Fix deadlock in the async subsystem (NoLockShutdown vs Shutdown in exception handler) [+] Added ProccessMap NT variant [+] Added ToolHelp image profiling [*] Improved exception awareness [*] Delegated SpawnThread to isolated TU, ready for reuse for RunAs and XNU Open - now with horrible evil alloc that could fail [+] Added header for future api 'UtilRun' [*] Improve NT core detection [*] Changed small affinity bitmap to AuUInt64 instead of AuUInt32 [+] Added data structure to hold cpuids/affinity masks [+] Implemented logger sinks [+] Implemented logger glue logic [*] Began migrating older loggers to sink-based default devices [*] Minor refactors [*] Improved internal exception discarding, not yet nothrow capable [*] Minor create directory fix
48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: CpuBitId.hpp
|
|
Date: 2022-1-24
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::HWInfo
|
|
{
|
|
struct CpuBitId
|
|
{
|
|
AuUInt64 lower {};
|
|
AuUInt64 upper {};
|
|
#if defined(_AU_MASSIVE_CPUID)
|
|
AuUInt64 upper2 {};
|
|
AuUInt64 upper3 {};
|
|
#endif
|
|
|
|
inline CpuBitId();
|
|
inline ~CpuBitId();
|
|
inline CpuBitId(AuUInt8 id);
|
|
|
|
inline bool HasValue() const;
|
|
|
|
inline void Add(const CpuBitId &id);
|
|
|
|
inline CpuBitId Not() const;
|
|
inline CpuBitId And(const CpuBitId &id) const;
|
|
inline CpuBitId Xor(const CpuBitId &id) const;
|
|
|
|
inline bool CpuBitScanForward(AuUInt8 &index, AuUInt8 offset) const;
|
|
|
|
inline bool TestCpuIdx(AuUInt8 idx) const;
|
|
inline void Clear();
|
|
inline void SetBit(AuUInt8 idx);
|
|
inline void ClearBit(AuUInt8 idx);
|
|
inline bool TestBit(AuUInt8 idx) const;
|
|
|
|
inline AuString ToString() const;
|
|
|
|
inline CpuBitId &operator=(const CpuBitId &id);
|
|
inline operator bool() const;
|
|
};
|
|
}
|
|
|
|
#include "CpuBitId.inl" |