| 27 | } |
| 28 | |
| 29 | void* UnixThread::ThreadProc(void* pThis) |
| 30 | { |
| 31 | auto thread = (UnixThread*)pThis; |
| 32 | #if PLATFORM_APPLE_FAMILY |
| 33 | // Apple doesn't support creating named thread so assign name here |
| 34 | { |
| 35 | const String& name = thread->GetName(); |
| 36 | pthread_setname_np(StringAsANSI<>(name.Get(), name.Length()).Get()); |
| 37 | } |
| 38 | #endif |
| 39 | const int32 exitCode = thread->Run(); |
| 40 | return (void*)(uintptr)exitCode; |
| 41 | } |
| 42 | |
| 43 | UnixThread* UnixThread::Setup(UnixThread* thread, uint32 stackSize) |
| 44 | { |