Move setsoftast() and friends into cpu.h and make them into macros, so arm26

is the same as every other port (except arm32).
This commit is contained in:
bjh21 2000-08-25 16:43:46 +00:00
parent a97bfde931
commit 7c9498f7cb
4 changed files with 33 additions and 41 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: except.c,v 1.12 2000/08/25 01:04:07 thorpej Exp $ */
/* $NetBSD: except.c,v 1.13 2000/08/25 16:43:46 bjh21 Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 Ben Harris
* All rights reserved.
@ -32,7 +32,7 @@
#include <sys/param.h>
__KERNEL_RCSID(0, "$NetBSD: except.c,v 1.12 2000/08/25 01:04:07 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: except.c,v 1.13 2000/08/25 16:43:46 bjh21 Exp $");
#include "opt_cputypes.h"
#include "opt_ddb.h"
@ -697,23 +697,6 @@ ast_handler(struct trapframe *tf)
userret(p, pc, sticks);
}
void
setsoftast()
{
astpending = 1;
}
extern int want_resched; /* XXX */
void
need_resched(struct cpu_info *ci)
{
want_resched = 1;
setsoftast();
}
#ifdef DEBUG
static void

View File

@ -1,23 +1,16 @@
/* $NetBSD: stubs.c,v 1.4 2000/08/20 15:16:52 bjh21 Exp $ */
/* $NetBSD: stubs.c,v 1.5 2000/08/25 16:43:46 bjh21 Exp $ */
/*
* stubs.c -- functions I haven't written yet
*/
#include <sys/param.h>
__RCSID("$NetBSD: stubs.c,v 1.4 2000/08/20 15:16:52 bjh21 Exp $");
__RCSID("$NetBSD: stubs.c,v 1.5 2000/08/25 16:43:46 bjh21 Exp $");
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/user.h>
void
need_proftick(p)
struct proc *p;
{
panic("need_proftick not implemented");
}
void
resettodr()
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.2 2000/05/26 21:19:30 thorpej Exp $ */
/* $NetBSD: cpu.h,v 1.3 2000/08/25 16:43:47 bjh21 Exp $ */
/*-
* Copyright (c) 1998 Ben Harris
* All rights reserved.
@ -54,4 +54,31 @@ extern struct cpu_info cpu_info_store;
#define INSN_SIZE 4
#ifdef _KERNEL
/* ASTs etc */
#include <sys/proc.h>
extern int want_resched, astpending;
#define setsoftast() \
do { \
astpending = 1; \
} while (/* CONSTCOND */ 0)
#define need_resched(ci) \
do { \
want_resched = 1; \
setsoftast(); \
} while (/* CONSTCOND */ 0)
#define need_proftick(p) \
do { \
(p)->p_flag |= P_OWEUPC; \
setsoftast(); \
} while (/* CONSTCOND */ 0)
#define signotify(p) setsoftast()
#endif /* _KERNEL */
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: intr.h,v 1.3 2000/08/25 01:04:07 thorpej Exp $ */
/* $NetBSD: intr.h,v 1.4 2000/08/25 16:43:47 bjh21 Exp $ */
/*-
* Copyright (c) 1998, 2000 Ben Harris
* All rights reserved.
@ -100,17 +100,6 @@ extern int hardsplx(int);
#define IST_EDGE 2 /* edge-triggered */
#define IST_LEVEL 3 /* level-triggered */
/*
* Emulated AST handling (faked trap on return to user code)
*/
#define signotify(p) setsoftast()
extern void setsoftast(void);
struct cpu_info;
extern void need_resched(struct cpu_info *);
extern void need_proftick(struct proc *);
/*
* Soft Interrupts
*/