Merge pull request #105164 from stuartcarnie/apple_pthread

Apple: Add pthread implementation of `Thread` class
This commit is contained in:
Thaddeus Crews
2025-04-10 10:18:12 -05:00
12 changed files with 336 additions and 2 deletions

View File

@@ -35,6 +35,11 @@
#include "core/os/thread.h"
#include "core/string/ustring.h"
#if defined(PLATFORM_THREAD_OVERRIDE) && defined(__APPLE__)
void init_thread_posix() {
}
#else
#ifdef PTHREAD_BSD_SET_NAME
#include <pthread_np.h>
#endif
@@ -73,4 +78,6 @@ void init_thread_posix() {
Thread::_set_platform_functions({ .set_name = set_name });
}
#endif // PLATFORM_THREAD_OVERRIDE && __APPLE__
#endif // UNIX_ENABLED