Share cpu_intr_p() with xen. Why xen has its own intr.c is a mystery.

This commit is contained in:
ad 2007-12-06 13:58:38 +00:00
parent 79511422f5
commit 5921ed7cda
2 changed files with 11 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.c,v 1.36 2007/12/03 15:34:27 ad Exp $ */
/* $NetBSD: intr.c,v 1.37 2007/12/06 13:58:38 ad Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@ -140,7 +140,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.36 2007/12/03 15:34:27 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.37 2007/12/06 13:58:38 ad Exp $");
#include "opt_multiprocessor.h"
#include "opt_acpi.h"
@ -999,10 +999,3 @@ softint_init_md(lwp_t *l, u_int level, uintptr_t *machdep)
intr_calculatemasks(ci);
}
bool
cpu_intr_p(void)
{
return (curcpu()->ci_idepth >= 0);
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: x86_machdep.c,v 1.14 2007/11/12 19:02:29 ad Exp $ */
/* $NetBSD: x86_machdep.c,v 1.15 2007/12/06 13:58:38 ad Exp $ */
/*-
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@ -39,7 +39,7 @@
#include "opt_multiprocessor.h"
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.14 2007/11/12 19:02:29 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.15 2007/12/06 13:58:38 ad Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -171,3 +171,10 @@ cpu_need_proftick(struct lwp *l)
l->l_pflag |= LP_OWEUPC;
aston(l);
}
bool
cpu_intr_p(void)
{
return (curcpu()->ci_idepth >= 0);
}