[*] Minor header updates

This commit is contained in:
Reece Wilson 2023-12-05 10:08:49 +00:00
parent f79be42357
commit b65d0032dd
3 changed files with 20 additions and 2 deletions

View File

@ -2,7 +2,7 @@
Copyright (C) 2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: RuntimeAliases.hpp
Date: 2023-1-12
Date: 2023-12-1
Author: Reece
***/
#pragma once

View File

@ -2,7 +2,7 @@
Copyright (C) 2021-2023 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: RuntimeConfig.hpp
Date: 2023-1-12
Date: 2023-12-1
Date: 2021-6-9
Author: Reece
***/

View File

@ -11,6 +11,13 @@
1: Wakes are orderless
2: uWordSize must be less than or equal to 8 bytes
3: only the least significant 32bits are guaranteed to be used as wake signals
in either mode:
1: WaitOnAddress[...] can wake at any-time if a fast path permits.
(we only care about strict guarantees during the deep slow-path yield operation.
after the first pass, after a cache miss, after a fast path succeeds,
it's anybodys guess who will *return* first. on the other hand, a set of 5 threads
already in the kernel *should* wake in the expected order. otherwise, WaitOnAddress[...]
just assumes pTargetAddress != pCompareAddress is an orderless return condition.)
* By default: UNIXes and targets below/inc Windows 7 will be in userland emulation mode for performance reasons.
* Linux and other targets can directly interface with their futex interface under a smaller wrapper;
@ -32,13 +39,24 @@ namespace Aurora::Threading
AUKN_SYM void WakeOnAddress(const void *pTargetAddress);
// WakeAllOnAddress with a uNMaximumThreads which may or may not be respected
AUKN_SYM void WakeNOnAddress(const void *pTargetAddress,
AuUInt8 uNMaximumThreads);
// On systems with processors of shared execution pipelines, these try-series of operations will spin (eg: mm_pause) for a configurable
// amount of time, so long as the the process-wide state isn't overly contested. This means you can use these arbitrarily without
// worrying about an accidental thundering mm_pause herd. If you wish to call WaitOnAddress[...] afterwards, you should report you already
// spun via optAlreadySpun. If the application is configured to spin later on, this hint may be used to prevent a double spin.
AUKN_SYM bool TryWaitOnAddress(const void *pTargetAddress,
const void *pCompareAddress,
AuUInt8 uWordSize);
// On systems with processors of shared execution pipelines, these try-series of operations will spin (eg: mm_pause) for a configurable
// amount of time, so long as the the process-wide state isn't overly contested. This means you can use these arbitrarily without
// worrying about an accidental thundering mm_pause herd. If you wish to call WaitOnAddress[...] afterwards, you should report you already
// spun via optAlreadySpun. If the application is configured to spin later on, this hint may be used to prevent a double spin.
// In the case of a pTargetAddress != pCompareAddress condition, the optional check parameter is used to verify the wake condition.
// Otherwise, spinning will continue.
AUKN_SYM bool TryWaitOnAddressEx(const void *pTargetAddress,
const void *pCompareAddress,
AuUInt8 uWordSize,