[audio_core, hle, video_core] force inline of functions that only contain thread loops (#3970)

traditionally, when doing jthread:

```
jthread() calls function parameter operator()() with args
function operator()() calls the code within
code within is, say { ThreadMain(); }
3 calls because why not
```

now this just makes it be 2 calls, mainly benefits non-LTO builds

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3970
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
This commit is contained in:
lizzie 2026-05-23 21:16:28 +02:00 committed by crueter
parent d761ecba8c
commit 37b5cf6003
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
7 changed files with 349 additions and 369 deletions

View file

@ -277,7 +277,17 @@ private:
state.store(State::Processing);
evt_processing->Signal();
worker = std::thread(&IScanRequest::WorkerThread, this);
worker = std::thread([this]() {
using namespace std::chrono_literals;
scan_results = Network::ScanWifiNetworks(3s);
{
std::scoped_lock lk{g_scan_mtx};
g_last_scan_results = scan_results;
}
// choose result code
const bool ok = !scan_results.empty();
Finish(ok ? ResultSuccess : ResultPendingConnection);
});
IPC::ResponseBuilder{ctx, 2}.Push(ResultSuccess);
}
@ -308,21 +318,6 @@ private:
enum class State { Idle, Processing, Finished };
void WorkerThread() {
using namespace std::chrono_literals;
scan_results = Network::ScanWifiNetworks(3s);
{
std::scoped_lock lk{g_scan_mtx};
g_last_scan_results = scan_results;
}
// choose result code
const bool ok = !scan_results.empty();
Finish(ok ? ResultSuccess : ResultPendingConnection);
}
void Finish(Result rc) {
worker_result.store(rc);
state.store(State::Finished);