diff --git a/sys/arch/atari/atari/genassym.cf b/sys/arch/atari/atari/genassym.cf index 002f85d995af..03d07c1813b1 100644 --- a/sys/arch/atari/atari/genassym.cf +++ b/sys/arch/atari/atari/genassym.cf @@ -1,4 +1,4 @@ -# $NetBSD: genassym.cf,v 1.24 2007/02/09 21:55:02 ad Exp $ +# $NetBSD: genassym.cf,v 1.25 2007/05/18 22:58:51 he Exp $ #- # Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -83,8 +83,6 @@ endif # lwp & proc fields and values define L_ADDR offsetof(struct lwp, l_addr) -define L_BACK offsetof(struct lwp, l_back) -define L_FORW offsetof(struct lwp, l_forw) define L_PRIORITY offsetof(struct lwp, l_priority) define L_STAT offsetof(struct lwp, l_stat) define L_WCHAN offsetof(struct lwp, l_wchan) diff --git a/sys/arch/atari/atari/locore.s b/sys/arch/atari/atari/locore.s index 0a01de910738..2261fdbbc919 100644 --- a/sys/arch/atari/atari/locore.s +++ b/sys/arch/atari/atari/locore.s @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.97 2007/03/21 10:56:26 tsutsui Exp $ */ +/* $NetBSD: locore.s,v 1.98 2007/05/18 22:58:51 he Exp $ */ /* * Copyright (c) 1980, 1990 The Regents of the University of California. @@ -1138,13 +1138,6 @@ ENTRY(qsetjmp) moveq #0,%d0 | return 0 rts - BSS(want_resched,4) - -/* - * Use common m68k process manipulation routines. - */ -#include - /* * Use common m68k process/lwp switch and context save subroutines. */ diff --git a/sys/arch/atari/atari/trap.c b/sys/arch/atari/atari/trap.c index 1615dc5e42de..bcf2d8ce3c3b 100644 --- a/sys/arch/atari/atari/trap.c +++ b/sys/arch/atari/atari/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.88 2007/03/21 10:56:26 tsutsui Exp $ */ +/* $NetBSD: trap.c,v 1.89 2007/05/18 22:58:52 he Exp $ */ /* * Copyright (c) 1982, 1986, 1990 The Regents of the University of California. @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.88 2007/03/21 10:56:26 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.89 2007/05/18 22:58:52 he Exp $"); #include "opt_ddb.h" #include "opt_execfmt.h" @@ -613,7 +613,7 @@ trap(type, code, v, frame) l->l_pflag &= ~LP_OWEUPC; ADDUPROF(l); } - if (want_resched) + if (curcpu()->ci_want_resched) preempt(); goto out; /* diff --git a/sys/arch/atari/include/cpu.h b/sys/arch/atari/include/cpu.h index 8866c5c2ecd2..1367c7e16b2d 100644 --- a/sys/arch/atari/include/cpu.h +++ b/sys/arch/atari/include/cpu.h @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.52 2007/03/21 10:56:27 tsutsui Exp $ */ +/* $NetBSD: cpu.h,v 1.53 2007/05/18 22:58:52 he Exp $ */ /* * Copyright (c) 1982, 1990 The Regents of the University of California. @@ -98,6 +98,7 @@ #include struct cpu_info { struct cpu_data ci_data; /* MI per-cpu data */ + int ci_want_resched; int ci_mtx_count; int ci_mtx_oldspl; }; @@ -143,7 +144,7 @@ struct clockframe { * Preempt the current process if in interrupt from user mode, * or after the current trap/syscall if in system mode. */ -#define cpu_need_resched(ci) {want_resched = 1; setsoftast();} +#define cpu_need_resched(ci,flags) {ci->ci_want_resched = 1; setsoftast();} /* * Give a profiling tick to the current process from the softclock @@ -162,7 +163,6 @@ struct clockframe { #define setsoftast() (astpending = 1) extern int astpending; /* need trap before returning to user mode */ -extern int want_resched; /* resched() was called */ /* * The rest of this should probably be moved to ../atari/ataricpu.h,