1

add name + running (nice_kill) to threads

This commit is contained in:
2022-07-22 21:38:43 +02:00
parent 3c6f6dd009
commit 16d7ae071d
2 changed files with 13 additions and 7 deletions

View File

@ -107,8 +107,8 @@ void kickoff(Thread* object) {
* Parameter: *
* stack Stack für die neue Koroutine *
*****************************************************************************/
Thread::Thread() : stack(new unsigned int[1024]), tid(ThreadCnt++) {
Thread::log << INFO << "Initialized thread with ID: " << this->tid << endl;
Thread::Thread(char* name) : name(name), stack(new unsigned int[1024]), tid(ThreadCnt++) {
Thread::log << INFO << "Initialized thread with ID: " << this->tid << " (" << name << ")" << endl;
Thread_init(&regs, stack + 1024, kickoff, this); // Stack grows from top to bottom
}