chore: add noreturn to more methods

This commit is contained in:
sithlord48 2025-07-03 19:26:13 -04:00 committed by Nick Bolton
parent 8a83f68ff0
commit 865365b2fa
5 changed files with 4 additions and 5 deletions

View file

@ -95,7 +95,6 @@ private:
static void threadCancel(int);
static void *threadSignalHandler(void *vrep);
private:
using ThreadList = std::list<ArchThread>;
static ArchMultithreadPosix *s_instance;

View file

@ -55,7 +55,7 @@ Thread &Thread::operator=(const Thread &thread)
return *this;
}
void Thread::exit(void *result)
[[noreturn]] void Thread::exit(void *result)
{
throw XThreadExit(result);
}

View file

@ -78,7 +78,7 @@ public:
\endcode
or add the \c RETHROW_XTHREAD macro to the \c catch(...) block.
*/
static void exit(void *);
[[noreturn]] static void exit(void *);
//! Cancel thread
/*!

View file

@ -119,7 +119,7 @@ void SocketMultiplexer::removeSocket(ISocket *socket)
unlockJobList();
}
void SocketMultiplexer::serviceThread(void *)
[[noreturn]] void SocketMultiplexer::serviceThread(void *)
{
std::vector<IArchNetwork::PollEntry> pfds;
IArchNetwork::PollEntry pfd;

View file

@ -60,7 +60,7 @@ private:
// and m_update while m_pollable and m_polling are true. all other
// threads must only modify these when m_pollable and m_polling are
// false. only the service thread sets m_polling.
void serviceThread(void *);
[[noreturn]] void serviceThread(void *);
// create, iterate, and destroy a cursor. a cursor is used to
// safely iterate through the job list while other threads modify