bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gnumach, more task based stuff


From: Alfred M. Szmidt
Subject: gnumach, more task based stuff
Date: Sun, 08 Jan 2006 18:05:45 +0100

Same here, explanation behind the changes, why etc.

2006-01-02  Samuel Thibault  <samuel.thibault@ens-lyon.org>

        * task.c (task_init): Call new machine_task_module_init() function.
        (task_create): Call new machine_task_init() function.
        (task_deallocate): Call new machine_task_terminate() function.
        (task_collect_scan): Call new machine_task_collect() function.
        * task.h: Include <machine/thread.h> for machine_task_t.
        (task): Add new machine member.

diff -urp gnumach-mine-4-more_ports/kern/task.c 
gnumach-mine-5-io_per_task/kern/task.c
--- gnumach-mine-4-more_ports/kern/task.c       2006-01-02 18:43:17.000000000 
+0100
+++ gnumach-mine-5-io_per_task/kern/task.c      2005-12-28 17:10:07.000000000 
+0100
@@ -78,6 +78,7 @@ void task_init(void)
                        0, "tasks");
 
        eml_init();
+       machine_task_module_init ();
 
        /*
         * Create the kernel task as the first task.
@@ -160,6 +161,7 @@ kern_return_t task_create(
 #if    NET_ATM
        new_task->nw_ep_owned = 0;
 #endif
+       machine_task_init (new_task);
 
        new_task->total_user_time.seconds = 0;
        new_task->total_user_time.microseconds = 0;
@@ -247,6 +249,8 @@ void task_deallocate(
        }
 #endif /* NORMA_TASK */
 
+       machine_task_terminate (task);
+
        eml_task_deallocate(task);
 
        pset = task->processor_set;
@@ -1126,6 +1130,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 -urp gnumach-mine-4-more_ports/kern/task.h 
gnumach-mine-5-io_per_task/kern/task.h
--- gnumach-mine-4-more_ports/kern/task.h       2006-01-02 18:43:22.000000000 
+0100
+++ gnumach-mine-5-io_per_task/kern/task.h      2005-12-28 17:44:11.000000000 
+0100
@@ -49,6 +49,7 @@
 #include <kern/pc_sample.h>
 #include <kern/processor.h>
 #include <kern/syscall_emulation.h>
+#include <machine/thread.h>
 #include <vm/vm_map.h>
 
 #if    NET_ATM
@@ -117,6 +118,9 @@ struct task {
 #if    NET_ATM
        nw_ep_owned_t   nw_ep_owned;
 #endif /* NET_ATM */
+
+       /* Hardware specific data.  */
+       machine_task_t  machine;
 };
 
 #define task_lock(task)                simple_lock(&(task)->lock)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]