mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
kernel/tasks: initialize task->last_core with initial core instead of 0
Otherwise it's not possible to determine on which core a task is running if it hasn't been rescheduled at least one time.
This commit is contained in:
parent
f93e66b4df
commit
b7d2dc95c5
1 changed files with 2 additions and 2 deletions
|
@ -376,7 +376,7 @@ int clone_task(tid_t* id, entry_point_t ep, void* arg, uint8_t prio)
|
|||
if (task_table[i].status == TASK_INVALID) {
|
||||
task_table[i].id = i;
|
||||
task_table[i].status = TASK_READY;
|
||||
task_table[i].last_core = 0;
|
||||
task_table[i].last_core = core_id;
|
||||
task_table[i].last_stack_pointer = NULL;
|
||||
task_table[i].stack = stack;
|
||||
task_table[i].prio = prio;
|
||||
|
@ -476,7 +476,7 @@ int create_task(tid_t* id, entry_point_t ep, void* arg, uint8_t prio, uint32_t c
|
|||
if (task_table[i].status == TASK_INVALID) {
|
||||
task_table[i].id = i;
|
||||
task_table[i].status = TASK_READY;
|
||||
task_table[i].last_core = 0;
|
||||
task_table[i].last_core = core_id;
|
||||
task_table[i].last_stack_pointer = NULL;
|
||||
task_table[i].stack = stack;
|
||||
task_table[i].prio = prio;
|
||||
|
|
Loading…
Add table
Reference in a new issue