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

MFC candidate
Noticed by:	luoqi
This commit is contained in:
Daniel Eischen 2006-02-16 01:33:36 +00:00
parent 94f0972bec
commit 9fcaf8a4ab
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155745
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) {