summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2000-11-29 20:17:15 +0000
committerjhb <jhb@FreeBSD.org>2000-11-29 20:17:15 +0000
commite96d454c32822d27500af899182dbab0751db3a5 (patch)
treedac796697adbaa20619c9cd007678625d15b9309 /sys
parente02d1f01f5629649bf4a94c353e80dac6b03e6e4 (diff)
downloadFreeBSD-src-e96d454c32822d27500af899182dbab0751db3a5.zip
FreeBSD-src-e96d454c32822d27500af899182dbab0751db3a5.tar.gz
Set p_mtxname when blocking on a mutex and clear it when waking up.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_mutex.c2
-rw-r--r--sys/kern/subr_turnstile.c2
-rw-r--r--sys/kern/subr_witness.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index a58311e..1e9c446 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -321,6 +321,7 @@ mtx_enter_hard(struct mtx *m, int type, int saveintr)
}
p->p_blocked = m; /* Who we're blocked on */
+ p->p_mtxname = m->mtx_description;
p->p_stat = SMTX;
#if 0
propagate_priority(p);
@@ -419,6 +420,7 @@ mtx_exit_hard(struct mtx *m, int type)
CTR2(KTR_LOCK, "mtx_exit: 0x%p contested setrunqueue 0x%p",
m, p1);
p1->p_blocked = NULL;
+ p1->p_mtxname = NULL;
p1->p_stat = SRUN;
setrunqueue(p1);
if ((type & MTX_NOSWITCH) == 0 && p1->p_priority < pri) {
diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c
index a58311e..1e9c446 100644
--- a/sys/kern/subr_turnstile.c
+++ b/sys/kern/subr_turnstile.c
@@ -321,6 +321,7 @@ mtx_enter_hard(struct mtx *m, int type, int saveintr)
}
p->p_blocked = m; /* Who we're blocked on */
+ p->p_mtxname = m->mtx_description;
p->p_stat = SMTX;
#if 0
propagate_priority(p);
@@ -419,6 +420,7 @@ mtx_exit_hard(struct mtx *m, int type)
CTR2(KTR_LOCK, "mtx_exit: 0x%p contested setrunqueue 0x%p",
m, p1);
p1->p_blocked = NULL;
+ p1->p_mtxname = NULL;
p1->p_stat = SRUN;
setrunqueue(p1);
if ((type & MTX_NOSWITCH) == 0 && p1->p_priority < pri) {
diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c
index a58311e..1e9c446 100644
--- a/sys/kern/subr_witness.c
+++ b/sys/kern/subr_witness.c
@@ -321,6 +321,7 @@ mtx_enter_hard(struct mtx *m, int type, int saveintr)
}
p->p_blocked = m; /* Who we're blocked on */
+ p->p_mtxname = m->mtx_description;
p->p_stat = SMTX;
#if 0
propagate_priority(p);
@@ -419,6 +420,7 @@ mtx_exit_hard(struct mtx *m, int type)
CTR2(KTR_LOCK, "mtx_exit: 0x%p contested setrunqueue 0x%p",
m, p1);
p1->p_blocked = NULL;
+ p1->p_mtxname = NULL;
p1->p_stat = SRUN;
setrunqueue(p1);
if ((type & MTX_NOSWITCH) == 0 && p1->p_priority < pri) {
OpenPOWER on IntegriCloud