exit1()/scheduler question.. possible typo?

Julian Elischer julian at elischer.org
Sun May 9 16:09:16 PDT 2004


in exit1 there is an assertion to test that the exiting process
is not init. (proc 1 by tradition..)

yes later, nearly at the end we see:

        /*
         * Allow the scheduler to adjust the priority of the
         * parent when a kseg is exiting.
         */
        if (p->p_pid != 1)
                sched_exit(p->p_pptr, td);
 

firstly, the comment is wrong but, the question comes..
"if init can not get here then why have the test?"

I get the impression that possibly this should be p->p_pptr->p_ppid
but I don't know enough about ULE to know if that makes sense.

(maybe it should be (p->p_pptr != initproc)





More information about the freebsd-current mailing list