2.4.0 task_struct initialization

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

  • Next message: Rik van Riel: "Re: multimounting cdroms ???"

    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 : Wed Jul 26 2000 - 18:31:35 EDT