Browse Source

Kernel: Run NetworkTask in init stage 2 to allow use of locks

Conrad Pankoff 6 years ago
parent
commit
61bdf09d78
1 changed files with 2 additions and 1 deletions
  1. 2 1
      Kernel/init.cpp

+ 2 - 1
Kernel/init.cpp

@@ -152,6 +152,8 @@ VFS* vfs;
     }
     }
     system_server_process->set_priority(Process::HighPriority);
     system_server_process->set_priority(Process::HighPriority);
 
 
+    Process::create_kernel_process("NetworkTask", NetworkTask_main);
+
     current->process().sys$exit(0);
     current->process().sys$exit(0);
     ASSERT_NOT_REACHED();
     ASSERT_NOT_REACHED();
 }
 }
@@ -268,7 +270,6 @@ extern "C" [[noreturn]] void init()
             (void)current->block<Thread::SemiPermanentBlocker>(Thread::SemiPermanentBlocker::Reason::Lurking);
             (void)current->block<Thread::SemiPermanentBlocker>(Thread::SemiPermanentBlocker::Reason::Lurking);
         }
         }
     });
     });
-    Process::create_kernel_process("NetworkTask", NetworkTask_main);
 
 
     Scheduler::pick_next();
     Scheduler::pick_next();