summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2004-08-03 02:23:06 +0000
committerDavid Xu <davidxu@FreeBSD.org>2004-08-03 02:23:06 +0000
commit4513fb36aa05311f7c37d4d22c61740af18f6ce3 (patch)
treeecab1eab8d4a6ebfbf396cb5ab2e5d6c501e078f
parent2ff39e1543499092693ebb5ab34cfa0cd91ed214 (diff)
Notes
-rw-r--r--lib/libkse/thread/thr_kern.c4
-rw-r--r--lib/libkse/thread/thr_priority_queue.c2
-rw-r--r--lib/libkse/thread/thr_private.h2
-rw-r--r--lib/libpthread/thread/thr_kern.c4
-rw-r--r--lib/libpthread/thread/thr_priority_queue.c2
-rw-r--r--lib/libpthread/thread/thr_private.h2
-rw-r--r--lib/libthread_db/libpthread_db.c6
-rw-r--r--sys/kern/kern_kse.c4
-rw-r--r--sys/sys/kse.h2
9 files changed, 14 insertions, 14 deletions
diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c
index 289ac8dc80788..c159f1bd10e2e 100644
--- a/lib/libkse/thread/thr_kern.c
+++ b/lib/libkse/thread/thr_kern.c
@@ -2525,12 +2525,12 @@ void
_thr_debug_check_yield(struct pthread *curthread)
{
/*
- * Note that TMDF_DONOTRUNUSER is set after process is suspended.
+ * Note that TMDF_SUSPEND is set after process is suspended.
* When we are being debugged, every suspension in process
* will cause all KSEs to schedule an upcall in kernel, unless the
* KSE is in critical region.
* If the function is being called, it means the KSE is no longer
- * in critical region, if the TMDF_DONOTRUNUSER is set by debugger
+ * in critical region, if the TMDF_SUSPEND is set by debugger
* before KSE leaves critical region, we will catch it here, else
* if the flag is changed during testing, it also not a problem,
* because the change only occurs after a process suspension event
diff --git a/lib/libkse/thread/thr_priority_queue.c b/lib/libkse/thread/thr_priority_queue.c
index 83187ffa65aef..f750a0178961d 100644
--- a/lib/libkse/thread/thr_priority_queue.c
+++ b/lib/libkse/thread/thr_priority_queue.c
@@ -274,7 +274,7 @@ _pq_first_debug(pq_queue_t *pq)
} else {
/*
* note there may be a suspension event during this
- * test, If TMDF_DONOTRUNUSER is set after we tested it,
+ * test, If TMDF_SUSPEND is set after we tested it,
* we will run the thread, this seems be a problem,
* fortunatly, when we are being debugged, all context
* switch will be done by kse_switchin, that is a
diff --git a/lib/libkse/thread/thr_private.h b/lib/libkse/thread/thr_private.h
index 0b0e366aa10a0..7a3ae5005377c 100644
--- a/lib/libkse/thread/thr_private.h
+++ b/lib/libkse/thread/thr_private.h
@@ -972,7 +972,7 @@ do { \
(((thrd)->flags & THR_FLAGS_SUSPENDED) != 0))
#define THR_IS_EXITING(thrd) (((thrd)->flags & THR_FLAGS_EXITING) != 0)
#define DBG_CAN_RUN(thrd) (((thrd)->tcb->tcb_tmbx.tm_dflags & \
- TMDF_DONOTRUNUSER) == 0)
+ TMDF_SUSPEND) == 0)
extern int __isthreaded;
diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c
index 289ac8dc80788..c159f1bd10e2e 100644
--- a/lib/libpthread/thread/thr_kern.c
+++ b/lib/libpthread/thread/thr_kern.c
@@ -2525,12 +2525,12 @@ void
_thr_debug_check_yield(struct pthread *curthread)
{
/*
- * Note that TMDF_DONOTRUNUSER is set after process is suspended.
+ * Note that TMDF_SUSPEND is set after process is suspended.
* When we are being debugged, every suspension in process
* will cause all KSEs to schedule an upcall in kernel, unless the
* KSE is in critical region.
* If the function is being called, it means the KSE is no longer
- * in critical region, if the TMDF_DONOTRUNUSER is set by debugger
+ * in critical region, if the TMDF_SUSPEND is set by debugger
* before KSE leaves critical region, we will catch it here, else
* if the flag is changed during testing, it also not a problem,
* because the change only occurs after a process suspension event
diff --git a/lib/libpthread/thread/thr_priority_queue.c b/lib/libpthread/thread/thr_priority_queue.c
index 83187ffa65aef..f750a0178961d 100644
--- a/lib/libpthread/thread/thr_priority_queue.c
+++ b/lib/libpthread/thread/thr_priority_queue.c
@@ -274,7 +274,7 @@ _pq_first_debug(pq_queue_t *pq)
} else {
/*
* note there may be a suspension event during this
- * test, If TMDF_DONOTRUNUSER is set after we tested it,
+ * test, If TMDF_SUSPEND is set after we tested it,
* we will run the thread, this seems be a problem,
* fortunatly, when we are being debugged, all context
* switch will be done by kse_switchin, that is a
diff --git a/lib/libpthread/thread/thr_private.h b/lib/libpthread/thread/thr_private.h
index 0b0e366aa10a0..7a3ae5005377c 100644
--- a/lib/libpthread/thread/thr_private.h
+++ b/lib/libpthread/thread/thr_private.h
@@ -972,7 +972,7 @@ do { \
(((thrd)->flags & THR_FLAGS_SUSPENDED) != 0))
#define THR_IS_EXITING(thrd) (((thrd)->flags & THR_FLAGS_EXITING) != 0)
#define DBG_CAN_RUN(thrd) (((thrd)->tcb->tcb_tmbx.tm_dflags & \
- TMDF_DONOTRUNUSER) == 0)
+ TMDF_SUSPEND) == 0)
extern int __isthreaded;
diff --git a/lib/libthread_db/libpthread_db.c b/lib/libthread_db/libpthread_db.c
index a2fae3b642a92..c5ef5ce1632de 100644
--- a/lib/libthread_db/libpthread_db.c
+++ b/lib/libthread_db/libpthread_db.c
@@ -487,9 +487,9 @@ pt_dbsuspend(const td_thrhandle_t *th, int suspend)
if (ret != 0)
return (P2T(ret));
if (suspend)
- dflags |= TMDF_DONOTRUNUSER;
+ dflags |= TMDF_SUSPEND;
else
- dflags &= ~TMDF_DONOTRUNUSER;
+ dflags &= ~TMDF_SUSPEND;
ret = ps_pwrite(ta->ph,
tmbx_addr + offsetof(struct kse_thr_mailbox, tm_dflags),
&dflags, sizeof(dflags));
@@ -594,7 +594,7 @@ pt_thr_get_info(const td_thrhandle_t *th, td_thrinfo_t *info)
break;
}
- info->ti_db_suspended = ((dflags & TMDF_DONOTRUNUSER) != 0);
+ info->ti_db_suspended = ((dflags & TMDF_SUSPEND) != 0);
info->ti_type = TD_THR_USER;
info->ti_pri = pt.active_priority;
info->ti_sigmask = pt.sigmask;
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c
index ab6ac29f493b2..955568762914f 100644
--- a/sys/kern/kern_kse.c
+++ b/sys/kern/kern_kse.c
@@ -161,7 +161,7 @@ kse_switchin(struct thread *td, struct kse_switchin_args *uap)
ptrace_single_step(td);
else
ptrace_clear_single_step(td);
- if (tmbx.tm_dflags & TMDF_DONOTRUNUSER) {
+ if (tmbx.tm_dflags & TMDF_SUSPEND) {
mtx_lock_spin(&sched_lock);
/* fuword can block, check again */
if (td->td_upcall)
@@ -1159,7 +1159,7 @@ thread_user_enter(struct proc *p, struct thread *td)
mtx_unlock_spin(&sched_lock);
if (__predict_false(p->p_flag & P_TRACED)) {
flags = fuword32(&tmbx->tm_dflags);
- if (flags & TMDF_DONOTRUNUSER) {
+ if (flags & TMDF_SUSPEND) {
mtx_lock_spin(&sched_lock);
/* fuword can block, check again */
if (td->td_upcall)
diff --git a/sys/sys/kse.h b/sys/sys/kse.h
index a0a2752a25031..4a7691a6d9309 100644
--- a/sys/sys/kse.h
+++ b/sys/sys/kse.h
@@ -101,7 +101,7 @@ struct kse_mailbox {
/* These flags are kept in tm_dlfags */
#define TMDF_SSTEP 0x01
-#define TMDF_DONOTRUNUSER 0x02
+#define TMDF_SUSPEND 0x02
/* Flags for kse_switchin */
#define KSE_SWITCHIN_SETTMBX 0x01