Added names to threads to assist when debugging.

This commit is contained in:
Brett Lawson
2015-08-01 13:25:09 -03:00
parent 2ab624a262
commit 8d4bfa9393
8 changed files with 99 additions and 23 deletions

View File

@@ -1,4 +1,5 @@
#include <algorithm>
#include "platform.h"
#include "interpreter.h"
#include "log.h"
#include "processor.h"
@@ -34,9 +35,13 @@ Processor::start()
for (auto core : mCores) {
core->thread = std::thread(std::bind(&Processor::coreEntryPoint, this, core));
static const std::string coreNames[] = { "Core #0", "Core #1", "Core #2" };
platform::set_thread_name(&core->thread, coreNames[core->id]);
}
mTimerThread = std::thread(std::bind(&Processor::timerEntryPoint, this));
platform::set_thread_name(&mTimerThread, "Timer Thread");
}
void