diff options
Diffstat (limited to 'kern')
-rw-r--r-- | kern/task.c | 5 | ||||
-rw-r--r-- | kern/task.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/kern/task.c b/kern/task.c index 1c4c673..45c59c5 100644 --- a/kern/task.c +++ b/kern/task.c @@ -67,6 +67,7 @@ void task_init(void) 0, "tasks"); eml_init(); + machine_task_module_init (); /* * Create the kernel task as the first task. @@ -145,6 +146,7 @@ kern_return_t task_create( eml_task_reference(new_task, parent_task); ipc_task_init(new_task, parent_task); + machine_task_init (new_task); new_task->total_user_time.seconds = 0; new_task->total_user_time.microseconds = 0; @@ -220,6 +222,8 @@ void task_deallocate( if (c != 0) return; + machine_task_terminate (task); + eml_task_deallocate(task); pset = task->processor_set; @@ -1092,6 +1096,7 @@ void task_collect_scan(void) pset_unlock(pset); simple_unlock(&all_psets_lock); + machine_task_collect (task); pmap_collect(task->map->pmap); if (prev_task != TASK_NULL) diff --git a/kern/task.h b/kern/task.h index dce3a76..1337a98 100644 --- a/kern/task.h +++ b/kern/task.h @@ -46,6 +46,7 @@ #include <kern/processor.h> #include <kern/syscall_emulation.h> #include <vm/vm_types.h> +#include <machine/task.h> struct task { /* Synchronization/destruction information */ @@ -98,6 +99,9 @@ struct task { vm_offset_t fast_tas_base[TASK_FAST_TAS_NRAS]; vm_offset_t fast_tas_end[TASK_FAST_TAS_NRAS]; #endif /* FAST_TAS */ + + /* Hardware specific data. */ + machine_task_t machine; }; #define task_lock(task) simple_lock(&(task)->lock) |