test: remove conditionals from uv_thread_self usage

The Windows limitation was fixed in: https://github.com/libuv/libuv/pull/3357.
This commit is contained in:
Yasser Nascimento 2026-03-04 17:46:31 -03:00 committed by Saúl Ibarra Corretgé
parent 50ed2fd7bd
commit 568470a2ef
2 changed files with 0 additions and 15 deletions

View File

@ -56,12 +56,7 @@ TEST_IMPL(thread_affinity) {
int i;
uv_thread_t threads[3];
#ifdef _WIN32
/* uv_thread_self isn't defined for the main thread on Windows */
threads[0] = GetCurrentThread();
#else
threads[0] = uv_thread_self();
#endif
cpumasksize = uv_cpumask_size();
ASSERT_GT(cpumasksize, 0);

View File

@ -38,12 +38,7 @@ static void thread_run(void* arg) {
sem = arg;
#ifdef _WIN32
/* uv_thread_self isn't defined for the main thread on Windows. */
thread = GetCurrentThread();
#else
thread = uv_thread_self();
#endif
r = uv_thread_setname("worker-thread");
ASSERT_OK(r);
@ -82,12 +77,7 @@ TEST_IMPL(thread_name) {
memset(long_thread_name, 'a', sizeof(long_thread_name) - 1);
long_thread_name[sizeof(long_thread_name) - 1] = '\0';
#ifdef _WIN32
/* uv_thread_self isn't defined for the main thread on Windows. */
threads[0] = GetCurrentThread();
#else
threads[0] = uv_thread_self();
#endif
r = uv_thread_getname(&threads[0], tn, sizeof(tn));
ASSERT_OK(r);