Adapt to the merge of the yamt-idlelwp branch.

curcpu()->ci_want_resched is now required, so get rid of the
want_resched global.  Also, cpu_need_resched() now takes two arguments.
The l_next and l_back fields in struct lwp no longer exists, so delete
references to it from genassym.cf.
Also, m68k/m68k/proc_subr.s is no longer used, says mhitch, so remove its use.

This brings the atari BOOT kernel back to a buildable state.
This commit is contained in:
he 2007-05-18 22:58:51 +00:00
parent 72c8d580f7
commit 57451082bc
4 changed files with 8 additions and 17 deletions

View File

@ -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)

View File

@ -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 <m68k/m68k/proc_subr.s>
/*
* Use common m68k process/lwp switch and context save subroutines.
*/

View File

@ -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 <sys/cdefs.h>
__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;
/*

View File

@ -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 <sys/cpu_data.h>
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,