Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys



Module Name:    src
Committed By:   ad
Date:           Wed Mar 21 18:26:00 UTC 2007

Modified Files:
        src/sys/kern: kern_exit.c kern_lwp.c sys_lwp.c
        src/sys/sys: lwp.h

Log Message:
Improvements to lwp_wait1(), for PR kern/35932:

- Better detect simple cycles of threads calling _lwp_wait and return
  EDEADLK. Does not handle deeper cycles like t1 -> t2 -> t3 -> t1.
- If there are multiple threads in _lwp_wait, then make sure that
  targeted waits take precedence over waits for any LWP to exit.
- When checking for deadlock, also count the number of zombies currently
  in the process as potentially reapable. Whenever a zombie is murdered,
  kick all waiters to make them check again for deadlock.
- Add more comments.

Also, while here:

- LOCK_ASSERT -> KASSERT in some places
- lwp_free: change boolean arguments to type 'bool'.
- proc_free: let lwp_free spin waiting for the last LWP to exit, there's
  no reason to do it here.


To generate a diff of this commit:
cvs rdiff -r1.171 -r1.172 src/sys/kern/kern_exit.c
cvs rdiff -r1.62 -r1.63 src/sys/kern/kern_lwp.c
cvs rdiff -r1.16 -r1.17 src/sys/kern/sys_lwp.c
cvs rdiff -r1.56 -r1.57 src/sys/sys/lwp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index