Kernel: Properly initialize and shutdown all modules.
This commit is contained in:
parent
57aaaf92db
commit
c7dc799e19
4 changed files with 20 additions and 9 deletions
|
@ -14,11 +14,10 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
unsigned int Object::next_object_id = 0;
|
||||
|
||||
SharedPtr<Thread> g_main_thread = nullptr;
|
||||
unsigned int Object::next_object_id;
|
||||
SharedPtr<Thread> g_main_thread;
|
||||
HandleTable g_handle_table;
|
||||
u64 g_program_id = 0;
|
||||
u64 g_program_id;
|
||||
|
||||
void WaitObject::AddWaitingThread(SharedPtr<Thread> thread) {
|
||||
auto itr = std::find(waiting_threads.begin(), waiting_threads.end(), thread);
|
||||
|
@ -138,6 +137,10 @@ void HandleTable::Clear() {
|
|||
void Init() {
|
||||
Kernel::ThreadingInit();
|
||||
Kernel::TimersInit();
|
||||
|
||||
Object::next_object_id = 0;
|
||||
g_program_id = 0;
|
||||
g_main_thread = nullptr;
|
||||
}
|
||||
|
||||
/// Shutdown the kernel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue