smp: thread_Start accepts NULL argument struct
This commit is contained in:
parent
cb338d752a
commit
7a08e3b9fb
@ -74,14 +74,16 @@ smp_thread_ID smp_thread_Start(void *entry, const smp_thread_Arguments *args, un
|
|||||||
t->state.cs = GDT_EXEC_SELECTOR;
|
t->state.cs = GDT_EXEC_SELECTOR;
|
||||||
t->state.ss = GDT_DATA_SELECTOR;
|
t->state.ss = GDT_DATA_SELECTOR;
|
||||||
t->state.rip = (uint64_t)__smp_thread_EntryPoint;
|
t->state.rip = (uint64_t)__smp_thread_EntryPoint;
|
||||||
|
|
||||||
t->state.rax = (uint64_t)entry;
|
t->state.rax = (uint64_t)entry;
|
||||||
|
|
||||||
|
if (args) {
|
||||||
t->state.rdi = args->a;
|
t->state.rdi = args->a;
|
||||||
t->state.rsi = args->b;
|
t->state.rsi = args->b;
|
||||||
t->state.rdx = args->c;
|
t->state.rdx = args->c;
|
||||||
t->state.rcx = args->d;
|
t->state.rcx = args->d;
|
||||||
t->state.r8 = args->e;
|
t->state.r8 = args->e;
|
||||||
t->state.r9 = args->f;
|
t->state.r9 = args->f;
|
||||||
|
}
|
||||||
|
|
||||||
tree_Node *spare = tree_FirstNode(__smp_StackPool);
|
tree_Node *spare = tree_FirstNode(__smp_StackPool);
|
||||||
if (spare) {
|
if (spare) {
|
||||||
|
Loading…
Reference in New Issue
Block a user