Re: How to extend the task_struct?

MOLNAR Ingo (mingo@chiara.csoma.elte.hu)
Tue, 4 Aug 1998 12:42:42 +0200 (CEST)


On Tue, 4 Aug 1998, Marc Bechler wrote:

> I had to extend the task_struct structure in the kernel (in sched.h) for
> some measurements. First I thought this won't so difficult: I append a
> new component at the end of the structure (an integer) and adapt the
> INIT_TASK definition by inserting a ,0 at the end.

yep, thats the way it's done. Take a look at say patch-2.1.107 as an
example. (two new fields were added)

> While compiling the kernel I got the following errors:
>
> init_task.c:24: parse error before ','
> init_task.c:24: warning: missing braces around initializer after 'init_task_union.task.sigmask.lock'
> init_task.c:24: warning: excess elements in struct initializer after 'init_task_union.task.sigmask.lock'
> gcc: internal compiler error...

most probably a simple typo :)

-- mingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html