diff options
author | jeff <jeff@FreeBSD.org> | 2007-06-12 07:24:46 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2007-06-12 07:24:46 +0000 |
commit | 49712c9a601c8ab93eac4b8f8cc221c287a68719 (patch) | |
tree | 871d4bb36f57e3d092d9b82e1e69c5c1633eccea /sys/net/ieee8023ad_lacp.h | |
parent | aa6c27d81763f98c4700e9a4f929f862980b366e (diff) | |
download | FreeBSD-src-49712c9a601c8ab93eac4b8f8cc221c287a68719.zip FreeBSD-src-49712c9a601c8ab93eac4b8f8cc221c287a68719.tar.gz |
Solve a complex exit race introduced with thread_lock:
- Add a count of exiting threads, p_exitthreads, to struct proc.
- Increment p_exithreads when we set the deadthread in thread_exit().
- When we thread_stash() a deadthread use an atomic to drop the count.
- Spin until the p_exithreads count reaches 0 in thread_wait().
- Lock the last exiting thread momentarily to be certain that it has
exited cpu_throw().
- Restructure thread_wait(). It does not need a loop as there will only
ever be one thread.
Tested by: moose@opera.com
Reported by: kris, moose@opera.com
Diffstat (limited to 'sys/net/ieee8023ad_lacp.h')
0 files changed, 0 insertions, 0 deletions