diff options
-rw-r--r-- | sys/kern/kern_kse.c | 4 | ||||
-rw-r--r-- | sys/kern/kern_thread.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index c9feadb..23f039a 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -615,6 +615,7 @@ thread_single(int force_exit) mtx_lock_spin(&sched_lock); TAILQ_REMOVE(&p->p_suspended, td, td_runq); + p->p_suspcount--; setrunqueue(td); /* Should suicide. */ mtx_unlock_spin(&sched_lock); } @@ -625,6 +626,8 @@ thread_single(int force_exit) abortsleep(td2); break; /* case TDS RUNNABLE: XXXKSE maybe raise priority? */ + default: /* needed to avoid an error */ + break; } } /* @@ -738,6 +741,7 @@ thread_suspend_check(int return_instead) if (p->p_numthreads == p->p_suspcount) { TAILQ_REMOVE(&p->p_suspended, p->p_singlethread, td_runq); + p->p_suspcount--; setrunqueue(p->p_singlethread); } } diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index c9feadb..23f039a 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -615,6 +615,7 @@ thread_single(int force_exit) mtx_lock_spin(&sched_lock); TAILQ_REMOVE(&p->p_suspended, td, td_runq); + p->p_suspcount--; setrunqueue(td); /* Should suicide. */ mtx_unlock_spin(&sched_lock); } @@ -625,6 +626,8 @@ thread_single(int force_exit) abortsleep(td2); break; /* case TDS RUNNABLE: XXXKSE maybe raise priority? */ + default: /* needed to avoid an error */ + break; } } /* @@ -738,6 +741,7 @@ thread_suspend_check(int return_instead) if (p->p_numthreads == p->p_suspcount) { TAILQ_REMOVE(&p->p_suspended, p->p_singlethread, td_runq); + p->p_suspcount--; setrunqueue(p->p_singlethread); } } |