Make SetThreadPrecedence return a std::string

This commit is contained in:
sukibaby
2025-05-22 20:08:56 -07:00
committed by teejusb
parent 6a29f651c7
commit 71cb44bde3
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -7,6 +7,7 @@
#include <cmath> #include <cmath>
#include <cstdint> #include <cstdint>
#include <string>
bool SuspendThread( uint64_t threadHandle ) bool SuspendThread( uint64_t threadHandle )
{ {
@@ -59,7 +60,7 @@ bool GetThreadBacktraceContext( uint64_t iID, BacktraceContext *ctx )
#endif #endif
} }
const char* SetThreadPrecedence( float prec ) std::string SetThreadPrecedence( float prec )
{ {
// Real values are between 0 and 63. // Real values are between 0 and 63.
DEBUG_ASSERT( 0.0f <= prec && prec <= 1.0f ); DEBUG_ASSERT( 0.0f <= prec && prec <= 1.0f );
+2 -1
View File
@@ -2,6 +2,7 @@
#define DARWIN_THREAD_HELPERS_H #define DARWIN_THREAD_HELPERS_H
#include <cstdint> #include <cstdint>
#include <string>
/** /**
* @brief Attempt to suspend the specified thread. * @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. * Valid values for the thread are from 0.0f to 1.0f.
* 0.5f is the default. * 0.5f is the default.
* @param prec the precedence to set. */ * @param prec the precedence to set. */
const char* SetThreadPrecedence( float prec ); std::string SetThreadPrecedence( float prec );
#endif #endif