task: Change to C++03 conventions to support older compilers. Related to commit 5428763.

This commit is contained in:
rogerman 2021-08-30 12:39:28 -07:00
parent ac472c13ef
commit 63702ff6bd
4 changed files with 32 additions and 32 deletions

View File

@ -1797,13 +1797,13 @@ SoftRasterizerRenderer::SoftRasterizerRenderer()
_rasterizerUnit[i].SetSLI(_threadPostprocessParam[i].startLine, _threadPostprocessParam[i].endLine, false);
_rasterizerUnit[i].SetRenderer(this);
char name[16];
snprintf(name, 16, "rasterizer %d", (int)i);
#ifdef DESMUME_COCOA
// The Cocoa port takes advantage of hand-optimized thread priorities
// to help stabilize performance when running SoftRasterizer.
_task[i].start(false, 43);
_task[i].start(false, 43, name);
#else
char name[16];
snprintf(name, 16, "rasterizer %d", i);
_task[i].start(false, 0, name);
#endif
}

View File

@ -1,5 +1,5 @@
/*
Copyright (C) 2009-2016 DeSmuME team
Copyright (C) 2009-2021 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -170,7 +170,7 @@ void Task::Impl::shutdown()
slock_unlock(this->mutex);
}
void Task::start(bool spinlock) { impl->start(spinlock, 0, nullptr); }
void Task::start(bool spinlock) { impl->start(spinlock, 0, NULL); }
void Task::start(bool spinlock, int threadPriority, const char *name) { impl->start(spinlock, threadPriority, name); }
void Task::shutdown() { impl->shutdown(); }
Task::Task() : impl(new Task::Impl()) {}

View File

@ -1,5 +1,5 @@
/*
Copyright (C) 2009-2018 DeSmuME team
Copyright (C) 2009-2021 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -30,7 +30,7 @@ public:
// initialize task runner
void start(bool spinlock);
void start(bool spinlock, int threadPriority, const char *name = nullptr);
void start(bool spinlock, int threadPriority, const char *name);
//execute some work
void execute(const TWork &work, void* param);

View File

@ -1,6 +1,6 @@
/*
Copyright (C) 2007 Tim Seidel
Copyright (C) 2008-2018 DeSmuME team
Copyright (C) 2008-2021 DeSmuME team
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -3396,7 +3396,7 @@ bool AdhocCommInterface::Start(WifiHandler* currentWifiHandler)
this->_rawPacket = (RXRawPacketData*)calloc(1, sizeof(RXRawPacketData));
#ifdef DESMUME_COCOA
this->_rxTask->start(false, 43);
this->_rxTask->start(false, 43, "wifi ad-hoc");
#else
this->_rxTask->start(false, 0, "wifi ad-hoc");
#endif
@ -3670,7 +3670,7 @@ bool SoftAPCommInterface::Start(WifiHandler* currentWifiHandler)
this->_rawPacket = (RXRawPacketData*)calloc(1, sizeof(RXRawPacketData));
#ifdef DESMUME_COCOA
this->_rxTask->start(false, 43);
this->_rxTask->start(false, 43, "wifi ap");
#else
this->_rxTask->start(false, 0, "wifi ap");
#endif