mirror of
https://github.com/RKX1209/nsemu.git
synced 2024-05-11 09:05:21 -04:00
19 lines
332 B
C++
19 lines
332 B
C++
#include "Nsemu.hpp"
|
|
|
|
namespace ThreadManager {
|
|
std::unordered_map<uint32_t, Thread *> threads;
|
|
unsigned long thread_id;
|
|
|
|
void Init() {
|
|
thread_id = 0;
|
|
}
|
|
|
|
Thread *Create() {
|
|
Thread *thread = new Thread();
|
|
threads[thread_id++] = thread;
|
|
thread->handle = NewHandle(thread);
|
|
return thread;
|
|
}
|
|
|
|
};
|