Don't forget to initialize a tailq before using it.

MFC candidate
Noticed by:	luoqi
This commit is contained in:
deischen 2006-02-16 01:33:36 +00:00
parent f1ce5c8660
commit 63bc390672
2 changed files with 2 additions and 0 deletions

View File

@ -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) {

View File

@ -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) {