Add SetThreadAffinityMask and SetThreadPriority and thread name for Apple platforms
This commit is contained in:
@@ -40,10 +40,7 @@ public:
|
||||
return (AppleThread*)Setup(New<AppleThread>(runnable, name, priority), stackSize);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
// [UnixThread]
|
||||
int32 GetThreadPriority(ThreadPriority priority) override
|
||||
static int32 GetAppleThreadPriority(ThreadPriority priority)
|
||||
{
|
||||
switch (priority)
|
||||
{
|
||||
@@ -60,6 +57,14 @@ protected:
|
||||
}
|
||||
return 31;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
// [UnixThread]
|
||||
int32 GetThreadPriority(ThreadPriority priority) override
|
||||
{
|
||||
return GetAppleThreadPriority(priority);
|
||||
}
|
||||
int32 Start(pthread_attr_t& attr) override
|
||||
{
|
||||
return pthread_create(&_thread, &attr, ThreadProc, this);
|
||||
|
||||
Reference in New Issue
Block a user