Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sh3 Use MI setrunqueue()/remrunqueue().



details:   https://anonhg.NetBSD.org/src/rev/14daa35efb92
branches:  trunk
changeset: 540480:14daa35efb92
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Dec 16 01:56:47 2002 +0000

description:
Use MI setrunqueue()/remrunqueue().

diffstat:

 sys/arch/sh3/include/types.h |   3 +-
 sys/arch/sh3/sh3/Locore.c    |  51 +-------------------------------------------
 2 files changed, 2 insertions(+), 52 deletions(-)

diffs (81 lines):

diff -r ac313bc09bd4 -r 14daa35efb92 sys/arch/sh3/include/types.h
--- a/sys/arch/sh3/include/types.h      Mon Dec 16 00:35:00 2002 +0000
+++ b/sys/arch/sh3/include/types.h      Mon Dec 16 01:56:47 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: types.h,v 1.12 2002/09/22 08:31:01 simonb Exp $        */
+/*     $NetBSD: types.h,v 1.13 2002/12/16 01:56:47 thorpej Exp $       */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -64,6 +64,5 @@
 #define        __HAVE_AST_PERPROC
 #define        __HAVE_GENERIC_SOFT_INTERRUPTS
 #define        __BROKEN_CONFIG_UNIT_USAGE      /* scif, sci driver */
-#define        __HAVE_MD_RUNQUEUE
 
 #endif /* !_SH3_TYPES_H_ */
diff -r ac313bc09bd4 -r 14daa35efb92 sys/arch/sh3/sh3/Locore.c
--- a/sys/arch/sh3/sh3/Locore.c Mon Dec 16 00:35:00 2002 +0000
+++ b/sys/arch/sh3/sh3/Locore.c Mon Dec 16 01:56:47 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: Locore.c,v 1.12 2002/05/09 12:28:08 uch Exp $  */
+/*     $NetBSD: Locore.c,v 1.13 2002/12/16 01:56:49 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1996, 1997, 2002 The NetBSD Foundation, Inc.
@@ -159,55 +159,6 @@
 }
 
 /*
- * Put process p on the run queue indicated by its priority.
- * Calls should be made at splstatclock(), and p->p_stat should be SRUN.
- */
-void
-setrunqueue(struct proc *p)
-{
-       struct prochd *q;
-       struct proc *oldlast;
-       int which = p->p_priority >> 2;
-
-#ifdef DIAGNOSTIC
-       if (p->p_back || which >= 32 || which < 0)
-               panic("setrunqueue");
-#endif
-       q = &sched_qs[which];
-       sched_whichqs |= 0x00000001 << which;
-       if (sched_whichqs == 0) {
-               panic("setrunqueue[whichqs == 0 ]");
-       }
-       p->p_forw = (struct proc *)q;
-       p->p_back = oldlast = q->ph_rlink;
-       q->ph_rlink = p;
-       oldlast->p_forw = p;
-}
-
-/*
- * Remove process p from its run queue, which should be the one
- * indicated by its priority.
- * Calls should be made at splstatclock().
- */
-void
-remrunqueue(struct proc *p)
-{
-       int which = p->p_priority >> 2;
-       struct prochd *q;
-
-#ifdef DIAGNOSTIC
-       if (!(sched_whichqs & (0x00000001 << which)))
-               panic("remrunqueue");
-#endif
-       p->p_forw->p_back = p->p_back;
-       p->p_back->p_forw = p->p_forw;
-       p->p_back = NULL;
-       q = &sched_qs[which];
-       if (q->ph_link == (struct proc *)q)
-               sched_whichqs &= ~(0x00000001 << which);
-}
-
-/*
  * void sh3_switch_setup(struct proc *p):
  *     prepare kernel stack PTE table. TLB miss handler check these.
  */



Home | Main Index | Thread Index | Old Index