X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/blobdiff_plain/984263bcb83ad82313113c6ac840d99124d8f90c..bf82f9b707378adec83bc6fffddb87994374279c:/sys/netproto/atm/atm_subr.c diff --git a/sys/netproto/atm/atm_subr.c b/sys/netproto/atm/atm_subr.c index 9796f688bc..c98aaf59ca 100644 --- a/sys/netproto/atm/atm_subr.c +++ b/sys/netproto/atm/atm_subr.c @@ -24,7 +24,7 @@ * notice must be reproduced on all copies. * * @(#) $FreeBSD: src/sys/netatm/atm_subr.c,v 1.7 2000/02/13 03:31:59 peter Exp $ - * + * @(#) $DragonFly: src/sys/netproto/atm/atm_subr.c,v 1.8 2003/11/08 07:57:52 dillon Exp $ */ /* @@ -35,13 +35,7 @@ * */ -#include -#include - -#ifndef lint -__RCSID("@(#) $FreeBSD: src/sys/netatm/atm_subr.c,v 1.7 2000/02/13 03:31:59 peter Exp $"); -#endif - +#include "kern_include.h" /* * Global variables @@ -61,7 +55,7 @@ int atm_dev_print = 0; int atm_print_data = 0; int atm_version = ATM_VERSION; struct timeval atm_debugtime = {0, 0}; -const int atmintrq_present = 1; +struct ifqueue atm_intrq; struct sp_info atm_attributes_pool = { "atm attributes pool", /* si_name */ @@ -74,8 +68,9 @@ struct sp_info atm_attributes_pool = { /* * Local functions */ -static void atm_compact __P((struct atm_time *)); -static KTimeout_ret atm_timexp __P((void *)); +static void atm_compact (struct atm_time *); +static KTimeout_ret atm_timexp (void *); +static void atm_intr(struct mbuf *); /* * Local variables @@ -127,7 +122,7 @@ atm_initialize() atm_intr_index = register_isr(atm_intr); #endif #ifdef __FreeBSD__ - register_netisr(NETISR_ATM, atm_intr); + netisr_register(NETISR_ATM, cpu0_portfn, atm_intr); #endif /* @@ -529,7 +524,7 @@ atm_timexp(arg) * Dispatch expired timers */ while (((tip = atm_timeq) != NULL) && (tip->ti_ticks == 0)) { - void (*func)__P((struct atm_time *)); + void (*func)(struct atm_time *); /* * Remove expired block from queue @@ -588,7 +583,7 @@ void atm_timeout(tip, t, func) struct atm_time *tip; int t; - void (*func)__P((struct atm_time *)); + void (*func)(struct atm_time *); { struct atm_time *tip1, *tip2; int s; @@ -723,7 +718,7 @@ atm_untimeout(tip) int atm_stack_enq(cmd, func, token, cvp, arg1, arg2) int cmd; - void (*func)__P((int, void *, int, int)); + void (*func)(int, void *, int, int); void *token; Atm_connvc *cvp; int arg1; @@ -884,52 +879,38 @@ atm_stack_drain() * none * */ -void -atm_intr() +static void +atm_intr(struct mbuf *m) { - KBuffer *m; caddr_t cp; atm_intr_func_t func; void *token; - int s; - for (; ; ) { - /* - * Get next buffer from queue - */ - s = splimp(); - IF_DEQUEUE(&atm_intrq, m); - (void) splx(s); - if (m == NULL) - break; - - /* - * Get function to call and token value - */ - KB_DATASTART(m, cp, caddr_t); - func = *(atm_intr_func_t *)cp; - cp += sizeof(func); - token = *(void **)cp; - KB_HEADADJ(m, -(sizeof(func) + sizeof(token))); - if (KB_LEN(m) == 0) { - KBuffer *m1; - KB_UNLINKHEAD(m, m1); - m = m1; - } + /* + * Get function to call and token value + */ + KB_DATASTART(m, cp, caddr_t); + func = *(atm_intr_func_t *)cp; + cp += sizeof(func); + token = *(void **)cp; + KB_HEADADJ(m, -(sizeof(func) + sizeof(token))); + if (KB_LEN(m) == 0) { + KBuffer *m1; + KB_UNLINKHEAD(m, m1); + m = m1; + } - /* - * Call processing function - */ - (*func)(token, m); + /* + * Call processing function + */ + (*func)(token, m); - /* - * Drain any deferred calls - */ - STACK_DRAIN(); - } + /* + * Drain any deferred calls + */ + STACK_DRAIN(); } - /* * Print a pdu buffer chain *