Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 May 2002 08:09:59 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern kern_exit.c
Message-ID:  <200205021509.g42F9x047390@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
jhb         2002/05/02 08:09:59 PDT

  Modified files:
    sys/kern             kern_exit.c 
  Log:
  - Reorder a few things so that when we lock the process at the end of
    exit1() we don't have to release it until we acquire schd_lock to
    call cpu_throw().
  - Since we can switch at any time due to preemption or a lock release
    prior to acquiring sched_lock, don't update switchtime and switchticks
    until the very end of exit1() after we have acquired sched_lock.
  - Interlock the proctree_lock and proc lock in wait1() and exit1() to
    avoid lost wakeups when a parent blocks waiting for a child to exit at
    the bottom of wait1().  In exit1() the proc lock interlocked with
    proctree_lock (and released after acquiring sched_lock) is that of
    the parent process.
  - In wait1() use an exclusive lock of proctree lock while we are
    looking for a process to harvest.  This allows us to completely
    remove all references to the process once we've found one (i.e.,
    disconnect it from pgrp's, session's, zombproc list, and it's parent's
    children list) "atomically" without needing to worry about a lock
    upgrade.
  - We don't need sched_lock to test if p_stat is SZOMB or SSTOP when holding
    the proc lock since the proc lock is always held with p_stat is set to
    SZOMB or SSTOP.
  - Protect nprocs with an xlock of the allproc_lock.
  
  Revision  Changes    Path
  1.158     +118 -107  src/sys/kern/kern_exit.c

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200205021509.g42F9x047390>