Make setsoftnet() into a macro, which seems to be the usual approach on systems

with generic soft interrupts.
This commit is contained in:
bjh21 2006-10-07 20:58:00 +00:00
parent 058379036b
commit 0e30542fee
2 changed files with 8 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: softintr.c,v 1.4 2005/12/11 12:16:03 christos Exp $ */
/* $NetBSD: softintr.c,v 1.5 2006/10/07 20:58:00 bjh21 Exp $ */
/*
* Copyright (c) 1999 Ben Harris.
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.4 2005/12/11 12:16:03 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: softintr.c,v 1.5 2006/10/07 20:58:00 bjh21 Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@ -65,7 +65,7 @@ LIST_HEAD(sh_head, softintr_handler);
static struct sh_head sh_head;
static struct softintr_handler *sh_softnet;
void *sh_softnet;
static void dosoftnet(void *);
@ -79,13 +79,6 @@ softintr_init()
sh_softnet = softintr_establish(IPL_SOFTNET, dosoftnet, NULL);
}
void
setsoftnet()
{
softintr_schedule(sh_softnet);
}
/* Handle software interrupts */
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.h,v 1.7 2006/10/07 20:51:47 bjh21 Exp $ */
/* $NetBSD: intr.h,v 1.8 2006/10/07 20:58:00 bjh21 Exp $ */
/*-
* Copyright (c) 1998, 2000 Ben Harris
* All rights reserved.
@ -104,14 +104,15 @@ extern int hardsplx(int);
* Soft Interrupts
*/
/* Old-fashioned soft interrupts */
extern void setsoftnet(void);
/* New-fangled generic soft interrupts */
extern void *softintr_establish(int, void (*)(void *), void *);
extern void softintr_disestablish(void *);
extern void softintr_schedule(void *);
/* Old-fashioned soft interrupts */
extern void *sh_softnet;
#define setsoftnet() softintr_schedule(sh_softnet)
/* Machine-dependent soft-interrupt servicing routines */
extern void softintr_init(void);
extern void dosoftints(int);