diff options
author | deischen <deischen@FreeBSD.org> | 2003-04-22 21:32:32 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2003-04-22 21:32:32 +0000 |
commit | 6fa234aec919187607467d59ce430d63f5efbcdf (patch) | |
tree | 46baef1b8b1390be0781d76242b7e5cf03545b92 | |
parent | 1e2ee18100884dabb6b87667b34ee8b59b4af1fb (diff) | |
download | FreeBSD-src-6fa234aec919187607467d59ce430d63f5efbcdf.zip FreeBSD-src-6fa234aec919187607467d59ce430d63f5efbcdf.tar.gz |
Set the quantum for scope system threads to 0 (no quantum).
-rw-r--r-- | lib/libkse/thread/thr_kern.c | 2 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_kern.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c index c4e9d5e..2da990e 100644 --- a/lib/libkse/thread/thr_kern.c +++ b/lib/libkse/thread/thr_kern.c @@ -1119,6 +1119,7 @@ _thr_schedule_add(struct pthread *curthread, struct pthread *newthread) newthread->kse->k_curthread = NULL; newthread->kse->k_mbx.km_flags = 0; newthread->kse->k_mbx.km_func = (kse_func_t *)kse_sched_multi; + newthread->kse->k_mbx.km_quantum = 0; /* * This thread needs a new KSE and KSEG. @@ -1857,6 +1858,7 @@ kse_free_unlocked(struct kse *kse) TAILQ_REMOVE(&active_kseq, kse, k_qe); active_kse_count--; kse->k_kseg = NULL; + kse->k_mbx.km_quantum = 20000; kse->k_flags &= ~KF_INITIALIZED; TAILQ_INSERT_HEAD(&free_kseq, kse, k_qe); free_kse_count++; diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c index c4e9d5e..2da990e 100644 --- a/lib/libpthread/thread/thr_kern.c +++ b/lib/libpthread/thread/thr_kern.c @@ -1119,6 +1119,7 @@ _thr_schedule_add(struct pthread *curthread, struct pthread *newthread) newthread->kse->k_curthread = NULL; newthread->kse->k_mbx.km_flags = 0; newthread->kse->k_mbx.km_func = (kse_func_t *)kse_sched_multi; + newthread->kse->k_mbx.km_quantum = 0; /* * This thread needs a new KSE and KSEG. @@ -1857,6 +1858,7 @@ kse_free_unlocked(struct kse *kse) TAILQ_REMOVE(&active_kseq, kse, k_qe); active_kse_count--; kse->k_kseg = NULL; + kse->k_mbx.km_quantum = 20000; kse->k_flags &= ~KF_INITIALIZED; TAILQ_INSERT_HEAD(&free_kseq, kse, k_qe); free_kse_count++; |