2.4.0 task_struct initialization

From: Frank van Maarseveen (F.vanMaarseveen@inter.NL.net)
Date: Wed Jul 26 2000 - 16:31:50 EST


Why is it that several entries in the definition of INIT_TASK are listed
as zero? AFAIK every compiler zeroes the missing elements in case of
an incomplete struct initializer.

If it matters, a lot of members needing a zero initialization seem to be
missing otherwise.

arch/i386/kernel/init_task.c:
union task_union init_task_union
        __attribute__((__section__(".data.init_task"))) =
                { INIT_TASK(init_task_union.task) };

include/linux/sched.h:

#define INIT_TASK(tsk) \
{ \
    state: 0, \
    flags: 0, \
    sigpending: 0, \
    .
    .
    mm: NULL, \
    .
    .
    keep_capabilities: 0, \
    .
    .
    signal: {{0}}, \
    blocked: {{0}}, \
    .
    .
    sigqueue: NULL, \
    .
    .
}

-- 
Frank

- 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.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:22 EST