fork return value
This commit is contained in:
@@ -16,13 +16,12 @@ extern pagetable_t identity_table;
|
||||
void Thread::kickoff(uintptr_t param1, uintptr_t param2, uintptr_t param3) {
|
||||
Thread *thread = reinterpret_cast<Thread *>(param1);
|
||||
assert(thread != nullptr && "Kickoff got nullptr pointer to Thread");
|
||||
(void)param2; // will be used later
|
||||
(void)param3; // will be used later
|
||||
// The core must have entered level 1/2 to cause a thread to be scheduled.
|
||||
Guard::leave();
|
||||
|
||||
if(!thread->isKernel)
|
||||
Core::Ring::switchToUsermode(thread->StackPointer.user, thread->start, 0);
|
||||
Core::Ring::switchToUsermode(thread->StackPointer.user, thread->start, (void*)param2);
|
||||
else
|
||||
if(thread->start == nullptr)
|
||||
thread->action();
|
||||
|
||||
Reference in New Issue
Block a user