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 { class IArchMultithread : public IInterface {
public: public:
//! Type of thread entry point //! Type of thread entry point
typedef void* (*ThreadFunc)(void*); typedef void (*ThreadFunc)(void*);
//! Type of thread identifier //! Type of thread identifier
typedef unsigned int ThreadID; typedef unsigned int ThreadID;
//! Types of signals //! Types of signals

View File

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

View File

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

View File

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

View File

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