diff options
author | marcus <marcus> | 2004-10-29 03:26:16 +0000 |
---|---|---|
committer | marcus <marcus> | 2004-10-29 03:26:16 +0000 |
commit | 95f34309066e04c20e3e39e6135e15e47b06d7fb (patch) | |
tree | 4e25ccf6acab51e7983c687ae83b3ab2ca825c46 /task/task-class.c | |
parent | ee7ff469f9b4bf1caa727658fd5cf0a03ed1bc98 (diff) |
2004-10-29 Marcus Brinkmann <marcus@gnu.org>
* 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.
Diffstat (limited to 'task/task-class.c')
-rw-r--r-- | task/task-class.c | 22 |
1 files changed, 1 insertions, 21 deletions
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); |