mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
fix calculation of the kernel stack, remove some typos
This commit is contained in:
parent
6d742c4d33
commit
4db6d86ad4
2 changed files with 2 additions and 3 deletions
|
@ -52,7 +52,7 @@ size_t get_kernel_stack(void)
|
|||
{
|
||||
task_t* curr_task = per_core(current_task);
|
||||
|
||||
return (size_t) curr_task->stack + curr_task->id * KERNEL_STACK_SIZE - 16; // => stack is 16byte aligned
|
||||
return (size_t) curr_task->stack + KERNEL_STACK_SIZE - 0x10; // => stack is 16byte aligned
|
||||
}
|
||||
|
||||
/* Setup a descriptor in the Global Descriptor Table */
|
||||
|
|
|
@ -109,7 +109,7 @@ int set_idle_task(void)
|
|||
task_table[i].status = TASK_IDLE;
|
||||
task_table[i].last_core = core_id;
|
||||
task_table[i].last_stack_pointer = NULL;
|
||||
task_table[i].stack = (char*) ((size_t)&boot_stack + core_id * KERNEL_STACK_SIZE);;
|
||||
task_table[i].stack = (char*) ((size_t)&boot_stack + core_id * KERNEL_STACK_SIZE);
|
||||
task_table[i].prio = IDLE_PRIO;
|
||||
spinlock_init(&task_table[i].vma_lock);
|
||||
task_table[i].vma_list = NULL;
|
||||
|
@ -120,7 +120,6 @@ int set_idle_task(void)
|
|||
per_core(current_task) = readyqueues[core_id].idle = task_table+i;
|
||||
ret = 0;
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue