diff options
author | deischen <deischen@FreeBSD.org> | 2006-02-16 01:33:36 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2006-02-16 01:33:36 +0000 |
commit | 63bc390672b64f30173336480250c8086d1ca56d (patch) | |
tree | a9e6965b1e0624f92ee6f9285e37c5e8e7ae17a3 /lib | |
parent | f1ce5c86603b5f73e31ea323d24ea1433850f704 (diff) | |
download | FreeBSD-src-63bc390672b64f30173336480250c8086d1ca56d.zip FreeBSD-src-63bc390672b64f30173336480250c8086d1ca56d.tar.gz |
Don't forget to initialize a tailq before using it.
MFC candidate
Noticed by: luoqi
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libkse/thread/thr_kern.c | 1 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_kern.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c index ae3a2ff..f1b28c0 100644 --- a/lib/libkse/thread/thr_kern.c +++ b/lib/libkse/thread/thr_kern.c @@ -1337,6 +1337,7 @@ kseg_gc(struct pthread *curthread) if (free_kseg_count <= MAX_CACHED_KSEGS) return; + TAILQ_INIT(&worklist); crit = _kse_critical_enter(); KSE_LOCK_ACQUIRE(curthread->kse, &kse_lock); while (free_kseg_count > MAX_CACHED_KSEGS) { diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c index ae3a2ff..f1b28c0 100644 --- a/lib/libpthread/thread/thr_kern.c +++ b/lib/libpthread/thread/thr_kern.c @@ -1337,6 +1337,7 @@ kseg_gc(struct pthread *curthread) if (free_kseg_count <= MAX_CACHED_KSEGS) return; + TAILQ_INIT(&worklist); crit = _kse_critical_enter(); KSE_LOCK_ACQUIRE(curthread->kse, &kse_lock); while (free_kseg_count > MAX_CACHED_KSEGS) { |