No functional change:
- s/vaule/value/ in comment. - whitespace fixes. - KNF.
This commit is contained in:
parent
07ee1dd971
commit
4ce7e1d5a4
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_ktrace.c,v 1.173 2018/09/03 16:29:35 riastradh Exp $ */
|
||||
/* $NetBSD: kern_ktrace.c,v 1.174 2020/02/05 09:59:50 msaitoh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
|
@ -61,7 +61,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.173 2018/09/03 16:29:35 riastradh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.174 2020/02/05 09:59:50 msaitoh Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -146,7 +146,7 @@ static void ktrace_thread(void *);
|
|||
static int ktrderefall(struct ktr_desc *, int);
|
||||
|
||||
/*
|
||||
* Default vaules.
|
||||
* Default values.
|
||||
*/
|
||||
#define KTD_MAXENTRY 1000 /* XXX: tune */
|
||||
#define KTD_TIMEOUT 5 /* XXX: tune */
|
||||
|
@ -528,7 +528,7 @@ ktealloc(struct ktrace_entry **ktep, void **bufp, lwp_t *l, int type,
|
|||
|
||||
void
|
||||
ktesethdrlen(struct ktrace_entry *kte, size_t l)
|
||||
{
|
||||
{
|
||||
kte->kte_kth.ktr_len = l;
|
||||
}
|
||||
|
||||
|
@ -818,7 +818,7 @@ ktr_csw(int out, int user)
|
|||
return;
|
||||
|
||||
/*
|
||||
* Don't record context switches resulting from blocking on
|
||||
* Don't record context switches resulting from blocking on
|
||||
* locks; it's too easy to get duff results.
|
||||
*/
|
||||
if (l->l_syncobj == &mutex_syncobj || l->l_syncobj == &rw_syncobj)
|
||||
|
@ -831,7 +831,7 @@ ktr_csw(int out, int user)
|
|||
* XXX This is not ideal: it would be better to maintain a pool
|
||||
* of ktes and actually push this to the kthread when context
|
||||
* switch happens, however given the points where we are called
|
||||
* from that is difficult to do.
|
||||
* from that is difficult to do.
|
||||
*/
|
||||
if (out) {
|
||||
if (ktrenter(l))
|
||||
|
@ -868,7 +868,7 @@ ktr_csw(int out, int user)
|
|||
kte->kte_kth.ktr_otv.tv_sec = ts->tv_sec;
|
||||
kte->kte_kth.ktr_otv.tv_usec = ts->tv_nsec / 1000;
|
||||
break;
|
||||
case 1:
|
||||
case 1:
|
||||
kte->kte_kth.ktr_ots.tv_sec = ts->tv_sec;
|
||||
kte->kte_kth.ktr_ots.tv_nsec = ts->tv_nsec;
|
||||
break;
|
||||
|
@ -1141,7 +1141,8 @@ done:
|
|||
*/
|
||||
/* ARGSUSED */
|
||||
int
|
||||
sys_fktrace(struct lwp *l, const struct sys_fktrace_args *uap, register_t *retval)
|
||||
sys_fktrace(struct lwp *l, const struct sys_fktrace_args *uap,
|
||||
register_t *retval)
|
||||
{
|
||||
/* {
|
||||
syscallarg(int) fd;
|
||||
|
@ -1224,8 +1225,8 @@ ktrops(lwp_t *curl, struct proc *p, int ops, int facs,
|
|||
#endif
|
||||
|
||||
out:
|
||||
mutex_exit(&ktrace_lock);
|
||||
mutex_exit(p->p_lock);
|
||||
mutex_exit(&ktrace_lock);
|
||||
mutex_exit(p->p_lock);
|
||||
|
||||
return error ? 0 : 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue