mirror of
https://github.com/wiiu-env/wiiload_plugin.git
synced 2024-11-22 02:29:15 +01:00
Remove the hardcoded threadname from the CThread class
This commit is contained in:
parent
03b9a7a928
commit
c8df037005
@ -40,7 +40,6 @@ ON_APPLICATION_START() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
ON_APPLICATION_REQUESTS_EXIT() {
|
||||
DEBUG_FUNCTION_LINE("Stop wiiload thread");
|
||||
stopThread();
|
||||
|
@ -27,7 +27,7 @@ public:
|
||||
typedef void (*Callback)(CThread *thread, void *arg);
|
||||
|
||||
//! constructor
|
||||
explicit CThread(int32_t iAttr, int32_t iPriority = 16, int32_t iStackSize = 0x8000, CThread::Callback callback = nullptr, void *callbackArg = nullptr)
|
||||
explicit CThread(int32_t iAttr, int32_t iPriority = 16, int32_t iStackSize = 0x8000, CThread::Callback callback = nullptr, void *callbackArg = nullptr, const std::string &threadName = "")
|
||||
: pThread(nullptr), pThreadStack(nullptr), pCallback(callback), pCallbackArg(callbackArg) {
|
||||
//! save attribute assignment
|
||||
iAttributes = iAttr;
|
||||
@ -38,7 +38,8 @@ public:
|
||||
//! create the thread
|
||||
if (pThread && pThreadStack) {
|
||||
OSCreateThread(pThread, &CThread::threadCallback, 1, (char *) this, pThreadStack + iStackSize, iStackSize, iPriority, iAttributes);
|
||||
OSSetThreadName(pThread, "Wiiload Thread");
|
||||
pThreadName = threadName;
|
||||
OSSetThreadName(pThread, pThreadName.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@ -141,4 +142,5 @@ private:
|
||||
uint8_t *pThreadStack;
|
||||
Callback pCallback;
|
||||
void *pCallbackArg;
|
||||
std::string pThreadName;
|
||||
};
|
@ -24,7 +24,7 @@
|
||||
#define WUHB_TEMP_FILE_2_EX "wiiu/apps/temp2.wuhb"
|
||||
|
||||
TcpReceiver::TcpReceiver(int32_t port)
|
||||
: CThread(CThread::eAttributeAffCore1, 16, 0x20000), exitRequested(false), serverPort(port), serverSocket(-1) {
|
||||
: CThread(CThread::eAttributeAffCore1, 16, 0x20000, nullptr, nullptr, "Wiiload Thread"), exitRequested(false), serverPort(port), serverSocket(-1) {
|
||||
|
||||
resumeThread();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user