sched.h

From: brian-kernel@stech.cx
Date: Sat Feb 19 2000 - 10:07:24 EST

  • Next message: William Stearns: "Re: building a new kernel"

    I've heard some mention this already, but nothing of a fix.

    In include/linux/sched.h, the recent patches have gone from a bunch of
    nearly unreadable stuff, which compiles fine on GCC 2.95.2/egcs 1.1.? .

    When it is patched to look pretty (someone even mentioned putting it in
    the CodingStyle), it doesn't compile (with GCC 2.95...). After
    un-patching sched.h, it works fine.

    -Brian

    good: (notice that it's being taken out by the patch)

    -#define INIT_TASK(name) \
    -/* state etc */ { 0,0,0,KERNEL_DS,&default_exec_domain,0, \
    -/* avg_slice */ 0, -1, \
    -/* counter */ DEF_PRIORITY,DEF_PRIORITY,SCHED_OTHER, \
    -/* mm */ NULL, &init_mm, \
    -/* has_cpu */ 0,0, \
    -/* run_list */ LIST_HEAD_INIT(init_task.run_list), \
    -/* next_task */ &init_task,&init_task, \
    -/* last_proc */ 0, \
    -/* binfmt */ NULL, \
    -/* ec,brk... */ 0,0,0,0,0,0, \
    -/* pid etc.. */ 0,0,0,0,0, \
    -/* proc links*/ &init_task,&init_task,NULL,NULL,NULL, \
    -/* pidhash */ NULL, NULL, \
    -/* chld wait */ __WAIT_QUEUE_HEAD_INITIALIZER(name.wait_chldexit), NULL, \
    -/* timeout */ 0,0,0,0,0,0,0, \
    -/* timer */ { NULL, NULL, 0, 0, it_real_fn }, \
    -/* utime */ {0,0,0,0},0, \
    -/* per CPU times */ {0, }, {0, }, \
    -/* flt */ 0,0,0,0,0,0, \
    -/* swp */ 0, \
    -/* process credentials */ \
    -/* uid etc */ 0,0,0,0,0,0,0,0, \
    -/* suppl grps*/ 0, {0,}, \
    -/* caps */ CAP_INIT_EFF_SET,CAP_INIT_INH_SET,CAP_FULL_SET, \
    -/* user */ NULL, \
    -/* rlimits */ INIT_RLIMITS, \
    -/* math */ 0, \
    -/* comm */ "swapper", \
    -/* fs info */ 0,NULL, \
    -/* ipc */ NULL, NULL, \
    -/* thread */ INIT_THREAD, \
    -/* fs */ &init_fs, \
    -/* files */ &init_files, \
    -/* signals */ SPIN_LOCK_UNLOCKED, &init_signals, {{0}}, {{0}}, NULL, &init_task.sigqueue, 0, 0, \
    -/* exec cts */ 0,0, \
    -/* exit_sem */ __MUTEX_INITIALIZER(name.exit_sem), \

    Not-so-good:
    +#define INIT_TASK(tsk) \
    +{ \
    + state: 0, \
    + flags: 0, \
    + sigpending: 0, \
    + addr_limit: KERNEL_DS, \
    + exec_domain: &default_exec_domain, \
    + lock_depth: -1, \
    + counter: DEF_PRIORITY, \
    + priority: DEF_PRIORITY, \
    + policy: SCHED_OTHER, \
    + mm: NULL, \
    + active_mm: &init_mm, \
    + run_list: LIST_HEAD_INIT(tsk.run_list), \
    + next_task: &tsk, \
    + prev_task: &tsk, \
    + p_opptr: &tsk, \
    + p_pptr: &tsk, \
    + wait_chldexit: __WAIT_QUEUE_HEAD_INITIALIZER(tsk.wait_chldexit),\
    + real_timer: { \
    + function: it_real_fn \
    + }, \
    + cap_effective: CAP_INIT_EFF_SET, \
    + cap_inheritable: CAP_INIT_INH_SET, \
    + cap_permitted: CAP_FULL_SET, \
    + rlim: INIT_RLIMITS, \
    + comm: "swapper", \
    + thread: INIT_THREAD, \
    + fs: &init_fs, \
    + files: &init_files, \
    + sigmask_lock: SPIN_LOCK_UNLOCKED, \
    + sig: &init_signals, \
    + signal: {{0}}, \
    + blocked: {{0}}, \
    + sigqueue: NULL, \
    + sigqueue_tail: &tsk.sigqueue, \
    + exit_sem: __MUTEX_INITIALIZER(tsk.exit_sem) \

    -
    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 : Sat Feb 19 2000 - 09:32:37 EST