Skip to content
Snippets Groups Projects
Commit 5e343a17 authored by Emeric Grange's avatar Emeric Grange
Browse files

fix implicit declaration of function 'GetCurrentThread' and related warnings

parent 3d79ee4c
No related branches found
No related tags found
No related merge requests found
......@@ -327,7 +327,7 @@ THREAD_PROC(EntropyWorkerThreadProc, lpParam)
HANDLE hCurrentThread = GetCurrentThread();
SetThreadAffinityMask(hCurrentThread, decoder->thread_cntrl.affinity);
#else
pthread_t thread = GetCurrentThread();
pthread_t thread = pthread_self();
uint32_t thread_affinity = decoder->thread_cntrl.affinity;
SetThreadAffinityMask(thread, &thread_affinity);
#endif
......@@ -403,7 +403,7 @@ THREAD_PROC(ParallelThreadProc, lpParam)
HANDLE hCurrentThread = GetCurrentThread();
SetThreadAffinityMask(hCurrentThread,decoder->thread_cntrl.affinity);
#else
pthread_t thread = GetCurrentThread();
pthread_t thread = pthread_self();
uint32_t thread_affinity = decoder->thread_cntrl.affinity;
SetThreadAffinityMask(thread, &thread_affinity);
#endif
......
......@@ -23,13 +23,7 @@
#include "thread.h"
#ifdef _WINDOWS
#else
pthread_t GetCurrentThread(void)
{
return pthread_self();
}
#ifndef _WINDOWS
//TODO: How to set the thread affinity on Macintosh and Linux?
void SetThreadAffinityMask(pthread_t thread, uint32_t *thread_affinity_mask)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment