From 71cb44bde3ffe9d938cbdc6a7ffaaa485ac5564c Mon Sep 17 00:00:00 2001 From: sukibaby <163092272+sukibaby@users.noreply.github.com> Date: Thu, 22 May 2025 19:37:17 -0700 Subject: [PATCH] Make SetThreadPrecedence return a std::string --- src/archutils/Darwin/DarwinThreadHelpers.cpp | 3 ++- src/archutils/Darwin/DarwinThreadHelpers.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/archutils/Darwin/DarwinThreadHelpers.cpp b/src/archutils/Darwin/DarwinThreadHelpers.cpp index 6e65114d9e..f6294a116d 100644 --- a/src/archutils/Darwin/DarwinThreadHelpers.cpp +++ b/src/archutils/Darwin/DarwinThreadHelpers.cpp @@ -7,6 +7,7 @@ #include #include +#include bool SuspendThread( uint64_t threadHandle ) { @@ -59,7 +60,7 @@ bool GetThreadBacktraceContext( uint64_t iID, BacktraceContext *ctx ) #endif } -const char* SetThreadPrecedence( float prec ) +std::string SetThreadPrecedence( float prec ) { // Real values are between 0 and 63. DEBUG_ASSERT( 0.0f <= prec && prec <= 1.0f ); diff --git a/src/archutils/Darwin/DarwinThreadHelpers.h b/src/archutils/Darwin/DarwinThreadHelpers.h index 48e0d37c58..228880ea49 100644 --- a/src/archutils/Darwin/DarwinThreadHelpers.h +++ b/src/archutils/Darwin/DarwinThreadHelpers.h @@ -2,6 +2,7 @@ #define DARWIN_THREAD_HELPERS_H #include +#include /** * @brief Attempt to suspend the specified thread. @@ -23,7 +24,7 @@ uint64_t GetCurrentThreadId(); * Valid values for the thread are from 0.0f to 1.0f. * 0.5f is the default. * @param prec the precedence to set. */ -const char* SetThreadPrecedence( float prec ); +std::string SetThreadPrecedence( float prec ); #endif