From 95f34309066e04c20e3e39e6135e15e47b06d7fb Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 29 Oct 2004 03:26:16 +0000 Subject: 2004-10-29 Marcus Brinkmann * Makefile.am (task_SOURCES): Add task-id.c. * task.h (task_id_to_task_lock, task_id_to_task): New declarations. (task_id_get_task): New static inline function. (task_id_enter, task_id_add): New prototypes. * task.c (create_bootstrap_caps): Enter the new tasks into the hash table with task_id_enter. * task-id.c: New file. --- task/task-class.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'task/task-class.c') diff --git a/task/task-class.c b/task/task-class.c index f439468..4fa4420 100644 --- a/task/task-class.c +++ b/task/task-class.c @@ -32,27 +32,6 @@ #include "task.h" -struct task -{ - /* The capability object must be the first member of this - struct. */ - struct hurd_cap_obj obj; - - /* The task ID is used in the version field of the global thread ID, - so it is limited to L4_THREAD_VERSION_BITS (14/32) bits and must - not have its lower 6 bits set to all zero (because that indicates - a local thread ID). */ - l4_word_t task_id; - - /* FIXME: Just for testing and dummy stuff: A small table of the - threads in this task. */ -#define MAX_THREADS 4 - l4_thread_id_t threads[MAX_THREADS]; - unsigned int nr_threads; -}; -typedef struct task *task_t; - - static void task_reinit (hurd_cap_class_t cap_class, hurd_cap_obj_t obj) { @@ -130,6 +109,7 @@ task_alloc (l4_word_t task_id, unsigned int nr_threads, if (err) return err; + task->task_id = task_id; assert (nr_threads <= MAX_THREADS); task->nr_threads = nr_threads; memcpy (task->threads, threads, sizeof (l4_thread_id_t) * nr_threads); -- cgit v1.2.3