[*] Shorten the expected overhead of some Linux primitives

This commit is contained in:
Reece Wilson 2023-08-13 20:09:58 +01:00
parent 3828712273
commit 04956bedba
2 changed files with 5 additions and 5 deletions

View File

@ -38,17 +38,17 @@ namespace Aurora::Threading::Primitives
static const auto kPrimitiveSize64LinuxMutex = 16; static const auto kPrimitiveSize64LinuxMutex = 16;
static const auto kPrimitiveSize64LinuxSemaphore = 16; static const auto kPrimitiveSize64LinuxSemaphore = 16;
static const auto kPrimitiveSize64LinuxCS = 40; static const auto kPrimitiveSize64LinuxCS = 40;
static const auto kPrimitiveSize64LinuxEvent = 80; static const auto kPrimitiveSize64LinuxEvent = 64;
static const auto kPrimitiveSize64LinuxRWLock = 88; static const auto kPrimitiveSize64LinuxRWLock = 88;
static const auto kPrimitiveSize64LinuxCond = 48; static const auto kPrimitiveSize64LinuxCond = 32;
static const auto kPrimitiveSize64LinuxCondMutex = 16; static const auto kPrimitiveSize64LinuxCondMutex = 16;
static const auto kPrimitiveSize32LinuxMutex = 8; static const auto kPrimitiveSize32LinuxMutex = 8;
static const auto kPrimitiveSize32LinuxSemaphore = 8; static const auto kPrimitiveSize32LinuxSemaphore = 8;
static const auto kPrimitiveSize32LinuxCS = 40; static const auto kPrimitiveSize32LinuxCS = 40;
static const auto kPrimitiveSize32LinuxEvent = 80; static const auto kPrimitiveSize32LinuxEvent = 64;
static const auto kPrimitiveSize32LinuxRWLock = 88; static const auto kPrimitiveSize32LinuxRWLock = 88;
static const auto kPrimitiveSize32LinuxCond = 48; static const auto kPrimitiveSize32LinuxCond = 32;
static const auto kPrimitiveSize32LinuxCondMutex = 16; static const auto kPrimitiveSize32LinuxCondMutex = 16;
// TODO: Other platforms... // TODO: Other platforms...

View File

@ -28,7 +28,7 @@ namespace Aurora::Threading::Primitives
private: private:
AuUInt32 uState_ {}; AuUInt32 uState_ {};
AuUInt32 uSleeping_ {}; AuUInt32 uSleeping_ {};
AuSPtr<LinuxConditionMutex> mutex_; std::shared_ptr<LinuxConditionMutex> mutex_;
}; };
struct CondVarDummy : IConditionVariable struct CondVarDummy : IConditionVariable