mirror of
https://github.com/simple64/simple64.git
synced 2026-11-03 05:06:49 +01:00
update parallel rdp
This commit is contained in:
1 parent
f5e21b0b44
commit
123969cfab
2 files changed
+7
-5
No files matched your search
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "thread_name.hpp"
|
||||
|
||||
#ifdef __linux__
|
||||
#if !defined(_WIN32)
|
||||
#include <pthread.h>
|
||||
#else
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
@@ -34,9 +34,11 @@ namespace Util
|
||||
{
|
||||
void set_current_thread_name(const char *name)
|
||||
{
|
||||
#ifdef __linux__
|
||||
#if defined(__linux__)
|
||||
pthread_setname_np(pthread_self(), name);
|
||||
#else
|
||||
#elif defined(__APPLE__)
|
||||
pthread_setname_np(name);
|
||||
#elif defined(_WIN32)
|
||||
using PFN_SetThreadDescription = HRESULT (WINAPI *)(HANDLE, PCWSTR);
|
||||
auto module = GetModuleHandleA("kernel32.dll");
|
||||
PFN_SetThreadDescription SetThreadDescription = module ? reinterpret_cast<PFN_SetThreadDescription>(
|
||||
@@ -54,4 +56,4 @@ void set_current_thread_name(const char *name)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user