summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_ktrace.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-09-11 20:58:10 +0000
committerjhb <jhb@FreeBSD.org>2002-09-11 20:58:10 +0000
commit5f504840803fc609bcfffc0d1c468841b5450f7a (patch)
tree9c22cadf07c169f81845c475bb281cf828129e66 /sys/kern/kern_ktrace.c
parentae7eea133f7d1d4b931097c6b84d401ce3c3474d (diff)
downloadFreeBSD-src-5f504840803fc609bcfffc0d1c468841b5450f7a.zip
FreeBSD-src-5f504840803fc609bcfffc0d1c468841b5450f7a.tar.gz
Remove support for synchronous ktrace requests now that none exist anymore.
They were an ugly, gross hack.
Diffstat (limited to 'sys/kern/kern_ktrace.c')
-rw-r--r--sys/kern/kern_ktrace.c44
1 files changed, 11 insertions, 33 deletions
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c
index c6d85e1..f58dfce 100644
--- a/sys/kern/kern_ktrace.c
+++ b/sys/kern/kern_ktrace.c
@@ -77,7 +77,6 @@ struct ktr_request {
struct ktr_psig ktr_psig;
struct ktr_csw ktr_csw;
} ktr_data;
- int ktr_synchronous;
STAILQ_ENTRY(ktr_request) ktr_list;
};
@@ -237,7 +236,6 @@ ktr_getrequest(int type)
req->ktr_cred = crhold(td->td_ucred);
req->ktr_header.ktr_buffer = NULL;
req->ktr_header.ktr_len = 0;
- req->ktr_synchronous = 0;
} else {
pm = print_message;
print_message = 0;
@@ -256,19 +254,6 @@ ktr_submitrequest(struct ktr_request *req)
mtx_lock(&ktrace_mtx);
STAILQ_INSERT_TAIL(&ktr_todo, req, ktr_list);
sema_post(&ktrace_sema);
- if (req->ktr_synchronous) {
- /*
- * For a synchronous request, we wait for the ktrace thread
- * to get to our item in the todo list and wake us up. Then
- * we write the request out ourselves and wake the ktrace
- * thread back up.
- */
- msleep(req, &ktrace_mtx, curthread->td_priority, "ktrsync", 0);
- mtx_unlock(&ktrace_mtx);
- ktr_writerequest(req);
- mtx_lock(&ktrace_mtx);
- wakeup(req);
- }
mtx_unlock(&ktrace_mtx);
curthread->td_inktrace = 0;
}
@@ -306,24 +291,17 @@ ktr_loop(void *dummy)
req = STAILQ_FIRST(&ktr_todo);
STAILQ_REMOVE_HEAD(&ktr_todo, ktr_list);
KASSERT(req != NULL, ("got a NULL request"));
- if (req->ktr_synchronous) {
- wakeup(req);
- msleep(req, &ktrace_mtx, curthread->td_priority,
- "ktrwait", 0);
- mtx_unlock(&ktrace_mtx);
- } else {
- mtx_unlock(&ktrace_mtx);
- /*
- * It is not enough just to pass the cached cred
- * to the VOP's in ktr_writerequest(). Some VFS
- * operations use curthread->td_ucred, so we need
- * to modify our thread's credentials as well.
- * Evil.
- */
- td->td_ucred = req->ktr_cred;
- ktr_writerequest(req);
- td->td_ucred = cred;
- }
+ mtx_unlock(&ktrace_mtx);
+ /*
+ * It is not enough just to pass the cached cred
+ * to the VOP's in ktr_writerequest(). Some VFS
+ * operations use curthread->td_ucred, so we need
+ * to modify our thread's credentials as well.
+ * Evil.
+ */
+ td->td_ucred = req->ktr_cred;
+ ktr_writerequest(req);
+ td->td_ucred = cred;
ktr_freerequest(req);
}
}
OpenPOWER on IntegriCloud