diff options
author | 2025-01-13 05:43:09 +1100 | |
---|---|---|
committer | 2025-01-13 05:43:09 +1100 | |
commit | ff92d10a0485717149b6cebc7122a3d545d48fd3 (patch) | |
tree | 735ea2a1959bcb92efa8f6b81fa72dc3494cdc38 /src/osd/osdcore.h | |
parent | 43c5edd139178545db68a794bdd9ad57678098ad (diff) |
osd: Added helper for getting CPU cache line size.
Diffstat (limited to 'src/osd/osdcore.h')
-rw-r--r-- | src/osd/osdcore.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/osd/osdcore.h b/src/osd/osdcore.h index f3f5fc2e9b3..b3dc2099913 100644 --- a/src/osd/osdcore.h +++ b/src/osd/osdcore.h @@ -19,6 +19,7 @@ #include <iosfwd> #include <string> #include <string_view> +#include <system_error> #include <utility> #include <vector> @@ -128,6 +129,8 @@ osd_ticks_t osd_ticks_per_second() noexcept; -----------------------------------------------------------------------------*/ void osd_sleep(osd_ticks_t duration) noexcept; + + /*************************************************************************** WORK ITEM INTERFACES ***************************************************************************/ @@ -350,6 +353,14 @@ void osd_work_item_release(osd_work_item *item); void osd_break_into_debugger(const char *message); +/// \brief Get cache line size in bytes +/// +/// This function gets the host CPU's level 1 cache line size in bytes. +/// \return A pair consisting of an error condition and the cache line +/// size in bytes if successful. +std::pair<std::error_condition, unsigned> osd_get_cache_line_size() noexcept; + + /*************************************************************************** UNCATEGORIZED INTERFACES |