Jamie Reece Wilson
109b0cff3f
(instead its pls dont use the public api instead of the internal NT apis)
38 lines
1.5 KiB
C++
38 lines
1.5 KiB
C++
/***
|
|
Copyright (C) 2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: AuWakeInternal.hpp
|
|
Date: 2023-6-15
|
|
Author: Reece
|
|
Note: Defines a LTS prototype for nanosecond-resolution WoA API for Desktop class Win32 primitives
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::Threading
|
|
{
|
|
// Buttered up native high-res wait for change API:
|
|
bool InternalLTSWaitOnAddressHighRes(const void *pTargetAddress,
|
|
const void *pCompareAddress,
|
|
AuUInt8 uWordSize,
|
|
AuUInt64 qwNanosecondsAbs);
|
|
|
|
// ...cont
|
|
void InternalLTSWakeAll(const void *pTargetAddress);
|
|
|
|
// ...cont
|
|
void InternalLTSWakeOne(const void *pTargetAddress);
|
|
|
|
// ...cont
|
|
void InternalLTSWakeCount(const void *pTargetAddress, AuUInt32 uCount);
|
|
|
|
// extra wrapping for use with primitives when expecting less scheduler indirection
|
|
// (its good to avoid the emulation layer in the slow paths of high level primitives)
|
|
|
|
static bool InternalLTSWaitOnAddressHighRes(volatile const void *pTargetAddress,
|
|
const void *pCompareAddress,
|
|
AuUInt8 uWordSize,
|
|
AuUInt64 qwNanosecondsAbs)
|
|
{
|
|
return InternalLTSWaitOnAddressHighRes((const void *)pTargetAddress, pCompareAddress, uWordSize, qwNanosecondsAbs);
|
|
}
|
|
} |