kern_ktrace.c (51492) | kern_ktrace.c (51791) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93 | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93 |
34 * $FreeBSD: head/sys/kern/kern_ktrace.c 51492 1999-09-21 03:47:42Z green $ | 34 * $FreeBSD: head/sys/kern/kern_ktrace.c 51791 1999-09-29 15:03:48Z marcel $ |
35 */ 36 37#include "opt_ktrace.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/sysproto.h> 42#include <sys/kernel.h> --- 146 unchanged lines hidden (view full) --- 189 FREE(kth, M_KTRACE); 190 FREE(ktp, M_KTRACE); 191 p->p_traceflag &= ~KTRFAC_ACTIVE; 192} 193 194void 195ktrpsig(vp, sig, action, mask, code) 196 struct vnode *vp; | 35 */ 36 37#include "opt_ktrace.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/sysproto.h> 42#include <sys/kernel.h> --- 146 unchanged lines hidden (view full) --- 189 FREE(kth, M_KTRACE); 190 FREE(ktp, M_KTRACE); 191 p->p_traceflag &= ~KTRFAC_ACTIVE; 192} 193 194void 195ktrpsig(vp, sig, action, mask, code) 196 struct vnode *vp; |
197 int sig; | 197 int sig, code; |
198 sig_t action; | 198 sig_t action; |
199 int mask, code; | 199 sigset_t *mask; |
200{ 201 struct ktr_header *kth; 202 struct ktr_psig kp; 203 struct proc *p = curproc; /* XXX */ 204 205 p->p_traceflag |= KTRFAC_ACTIVE; 206 kth = ktrgetheader(KTR_PSIG); 207 kp.signo = (char)sig; 208 kp.action = action; | 200{ 201 struct ktr_header *kth; 202 struct ktr_psig kp; 203 struct proc *p = curproc; /* XXX */ 204 205 p->p_traceflag |= KTRFAC_ACTIVE; 206 kth = ktrgetheader(KTR_PSIG); 207 kp.signo = (char)sig; 208 kp.action = action; |
209 kp.mask = mask; | 209 kp.mask = *mask; |
210 kp.code = code; 211 kth->ktr_buf = (caddr_t)&kp; 212 kth->ktr_len = sizeof (struct ktr_psig); 213 214 ktrwrite(vp, kth); 215 FREE(kth, M_KTRACE); 216 p->p_traceflag &= ~KTRFAC_ACTIVE; 217} --- 320 unchanged lines hidden --- | 210 kp.code = code; 211 kth->ktr_buf = (caddr_t)&kp; 212 kth->ktr_len = sizeof (struct ktr_psig); 213 214 ktrwrite(vp, kth); 215 FREE(kth, M_KTRACE); 216 p->p_traceflag &= ~KTRFAC_ACTIVE; 217} --- 320 unchanged lines hidden --- |