kern_intr.c (108372) | kern_intr.c (109623) |
---|---|
1/* 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * 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 --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * | 1/* 2 * Copyright (c) 1997, Stefan Esser <se@freebsd.org> 3 * 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 --- 9 unchanged lines hidden (view full) --- 18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/kern/kern_intr.c 108372 2002-12-28 23:22:22Z jake $ | 26 * $FreeBSD: head/sys/kern/kern_intr.c 109623 2003-01-21 08:56:16Z alfred $ |
27 * 28 */ 29 30 31#include <sys/param.h> 32#include <sys/bus.h> 33#include <sys/rtprio.h> 34#include <sys/systm.h> --- 136 unchanged lines hidden (view full) --- 171 struct proc *p; 172 int error; 173 va_list ap; 174 175 /* The only valid flag during creation is IT_SOFT. */ 176 if ((flags & ~IT_SOFT) != 0) 177 return (EINVAL); 178 | 27 * 28 */ 29 30 31#include <sys/param.h> 32#include <sys/bus.h> 33#include <sys/rtprio.h> 34#include <sys/systm.h> --- 136 unchanged lines hidden (view full) --- 171 struct proc *p; 172 int error; 173 va_list ap; 174 175 /* The only valid flag during creation is IT_SOFT. */ 176 if ((flags & ~IT_SOFT) != 0) 177 return (EINVAL); 178 |
179 ithd = malloc(sizeof(struct ithd), M_ITHREAD, M_WAITOK | M_ZERO); | 179 ithd = malloc(sizeof(struct ithd), M_ITHREAD, M_ZERO); |
180 ithd->it_vector = vector; 181 ithd->it_disable = disable; 182 ithd->it_enable = enable; 183 ithd->it_flags = flags; 184 TAILQ_INIT(&ithd->it_handlers); 185 mtx_init(&ithd->it_lock, "ithread", NULL, MTX_DEF); 186 187 va_start(ap, fmt); --- 55 unchanged lines hidden (view full) --- 243{ 244 struct intrhand *ih, *temp_ih; 245 246 if (ithread == NULL || name == NULL || handler == NULL) 247 return (EINVAL); 248 if ((flags & INTR_FAST) !=0) 249 flags |= INTR_EXCL; 250 | 180 ithd->it_vector = vector; 181 ithd->it_disable = disable; 182 ithd->it_enable = enable; 183 ithd->it_flags = flags; 184 TAILQ_INIT(&ithd->it_handlers); 185 mtx_init(&ithd->it_lock, "ithread", NULL, MTX_DEF); 186 187 va_start(ap, fmt); --- 55 unchanged lines hidden (view full) --- 243{ 244 struct intrhand *ih, *temp_ih; 245 246 if (ithread == NULL || name == NULL || handler == NULL) 247 return (EINVAL); 248 if ((flags & INTR_FAST) !=0) 249 flags |= INTR_EXCL; 250 |
251 ih = malloc(sizeof(struct intrhand), M_ITHREAD, M_WAITOK | M_ZERO); | 251 ih = malloc(sizeof(struct intrhand), M_ITHREAD, M_ZERO); |
252 ih->ih_handler = handler; 253 ih->ih_argument = arg; 254 ih->ih_name = name; 255 ih->ih_ithread = ithread; 256 ih->ih_pri = pri; 257 if (flags & INTR_FAST) 258 ih->ih_flags = IH_FAST | IH_EXCLUSIVE; 259 else if (flags & INTR_EXCL) --- 350 unchanged lines hidden --- | 252 ih->ih_handler = handler; 253 ih->ih_argument = arg; 254 ih->ih_name = name; 255 ih->ih_ithread = ithread; 256 ih->ih_pri = pri; 257 if (flags & INTR_FAST) 258 ih->ih_flags = IH_FAST | IH_EXCLUSIVE; 259 else if (flags & INTR_EXCL) --- 350 unchanged lines hidden --- |