Add inlined current thread id on Linux and Android

This commit is contained in:
Wojtek Figat
2022-01-11 13:24:53 +01:00
parent 495b309736
commit dafa6bff2e
4 changed files with 10 additions and 13 deletions

View File

@@ -5,6 +5,7 @@
#if PLATFORM_ANDROID
#include "Engine/Platform/Unix/UnixPlatform.h"
#include <pthread.h>
struct android_app;
@@ -83,7 +84,10 @@ public:
static int32 GetCacheLineSize();
static MemoryStats GetMemoryStats();
static ProcessMemoryStats GetProcessMemoryStats();
static uint64 GetCurrentThreadID();
static uint64 GetCurrentThreadID()
{
return static_cast<uint64>(pthread_self());
}
static void SetThreadPriority(ThreadPriority priority);
static void SetThreadAffinityMask(uint64 affinityMask);
static void Sleep(int32 milliseconds);