lib: Make ThreadFunc return nothing

This commit is contained in:
Povilas Kanapickas 2021-11-01 06:16:31 +02:00
parent 815e80ec4d
commit 9cf590ccd7
5 changed files with 5 additions and 10 deletions

View File

@ -71,7 +71,7 @@ barrier. Each architecture must implement this interface.
class IArchMultithread : public IInterface {
public:
//! Type of thread entry point
typedef void* (*ThreadFunc)(void*);
typedef void (*ThreadFunc)(void*);
//! Type of thread identifier
typedef unsigned int ThreadID;
//! Types of signals

View File

@ -501,11 +501,9 @@ ArchTaskBarWindows::threadMainLoop()
UnregisterClass(className, instanceWin32());
}
void*
ArchTaskBarWindows::threadEntry(void* self)
void ArchTaskBarWindows::threadEntry(void* self)
{
static_cast<ArchTaskBarWindows*>(self)->threadMainLoop();
return NULL;
}
HINSTANCE ArchTaskBarWindows::instanceWin32()

View File

@ -84,7 +84,7 @@ private:
static LRESULT CALLBACK
staticWndProc(HWND, UINT, WPARAM, LPARAM);
void threadMainLoop();
static void* threadEntry(void*);
static void threadEntry(void*);
HINSTANCE instanceWin32();

View File

@ -126,8 +126,7 @@ Thread::operator!=(const Thread& thread) const
return !ARCH->isSameThread(m_thread, thread.m_thread);
}
void*
Thread::threadFunc(void* vjob)
void Thread::threadFunc(void* vjob)
{
// get this thread's id for logging
IArchMultithread::ThreadID id;
@ -168,6 +167,4 @@ Thread::threadFunc(void* vjob)
// done with job
delete job;
return nullptr;
}

View File

@ -192,7 +192,7 @@ public:
private:
Thread(ArchThread);
static void* threadFunc(void*);
static void threadFunc(void*);
private:
ArchThread m_thread;