Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm32 Inline need_resched() and need_proftick(). M...



details:   https://anonhg.NetBSD.org/src/rev/ffc94774009d
branches:  trunk
changeset: 500446:ffc94774009d
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Tue Dec 12 06:06:05 2000 +0000

description:
Inline need_resched() and need_proftick().  Make need_proftick() actually *do*
something!

diffstat:

 sys/arch/arm32/arm32/intr.c                  |  11 +----------
 sys/arch/arm32/footbridge/footbridge_clock.c |   9 +--------
 sys/arch/arm32/include/cpu.h                 |  18 ++++++++++++++----
 sys/arch/arm32/iomd/iomd_clock.c             |   9 +--------
 sys/arch/arm32/isa/clock.c                   |   8 +-------
 sys/arch/arm32/ofw/ofwgencfg_clock.c         |   9 +--------
 6 files changed, 19 insertions(+), 45 deletions(-)

diffs (146 lines):

diff -r d1daa790c2b3 -r ffc94774009d sys/arch/arm32/arm32/intr.c
--- a/sys/arch/arm32/arm32/intr.c       Tue Dec 12 05:35:48 2000 +0000
+++ b/sys/arch/arm32/arm32/intr.c       Tue Dec 12 06:06:05 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.21 2000/08/25 01:04:07 thorpej Exp $        */
+/*     $NetBSD: intr.c,v 1.22 2000/12/12 06:06:05 mycroft Exp $        */
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -112,15 +112,6 @@
        astpending = 1;
 }
 
-extern int want_resched;
-
-void
-need_resched(struct cpu_info *ci)
-{
-       want_resched = 1;
-       setsoftast();
-}
-
 /* Handle software interrupts */
 
 void
diff -r d1daa790c2b3 -r ffc94774009d sys/arch/arm32/footbridge/footbridge_clock.c
--- a/sys/arch/arm32/footbridge/footbridge_clock.c      Tue Dec 12 05:35:48 2000 +0000
+++ b/sys/arch/arm32/footbridge/footbridge_clock.c      Tue Dec 12 06:06:05 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: footbridge_clock.c,v 1.4 2000/02/13 04:59:57 mark Exp $        */
+/*     $NetBSD: footbridge_clock.c,v 1.5 2000/12/12 06:06:05 mycroft Exp $     */
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -281,13 +281,6 @@
        (void)splx(s);          
 }
 
-
-void
-need_proftick(p)
-       struct proc *p;
-{
-}
-
 /*
  * Estimated loop for n microseconds
  */
diff -r d1daa790c2b3 -r ffc94774009d sys/arch/arm32/include/cpu.h
--- a/sys/arch/arm32/include/cpu.h      Tue Dec 12 05:35:48 2000 +0000
+++ b/sys/arch/arm32/include/cpu.h      Tue Dec 12 06:06:05 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.h,v 1.23 2000/12/12 05:21:03 mycroft Exp $ */
+/*     $NetBSD: cpu.h,v 1.24 2000/12/12 06:06:06 mycroft Exp $ */
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -255,9 +255,19 @@
 #if defined(_KERNEL) && !defined(_LOCORE)
 extern int current_intr_depth;
 
-/* stubs.c */
-void need_resched      __P((struct cpu_info *));
-void need_proftick     __P((struct proc *p));
+/*
+ * Preempt the current process if in interrupt from user mode,
+ * or after the current trap/syscall if in system mode.
+ */
+int    want_resched;           /* resched() was called */
+#define        need_resched(ci)        (want_resched = 1, setsoftast())
+
+/*
+ * Give a profiling tick to the current process when the user profiling
+ * buffer pages are invalid.  On the i386, request an ast to send us
+ * through trap(), marking the proc as needing a profiling tick.
+ */
+#define        need_proftick(p)        ((p)->p_flag |= P_OWEUPC, setsoftast())
 
 /* locore.S */
 void atomic_set_bit    __P((u_int *address, u_int setmask));
diff -r d1daa790c2b3 -r ffc94774009d sys/arch/arm32/iomd/iomd_clock.c
--- a/sys/arch/arm32/iomd/iomd_clock.c  Tue Dec 12 05:35:48 2000 +0000
+++ b/sys/arch/arm32/iomd/iomd_clock.c  Tue Dec 12 06:06:05 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iomd_clock.c,v 1.21 2000/02/13 04:59:58 mark Exp $     */
+/*     $NetBSD: iomd_clock.c,v 1.22 2000/12/12 06:06:06 mycroft Exp $  */
 
 /*
  * Copyright (c) 1994-1997 Mark Brinicombe.
@@ -310,13 +310,6 @@
        (void)splx(s);          
 }
 
-
-void
-need_proftick(p)
-       struct proc *p;
-{
-}
-
 /*
  * Estimated loop for n microseconds
  */
diff -r d1daa790c2b3 -r ffc94774009d sys/arch/arm32/isa/clock.c
--- a/sys/arch/arm32/isa/clock.c        Tue Dec 12 05:35:48 2000 +0000
+++ b/sys/arch/arm32/isa/clock.c        Tue Dec 12 06:06:05 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.4 2000/01/19 02:52:17 msaitoh Exp $        */
+/*     $NetBSD: clock.c,v 1.5 2000/12/12 06:06:06 mycroft Exp $        */
 
 /*
  * Copyright 1997
@@ -666,10 +666,4 @@
        (void)splx(s);          
 }
 
-void
-need_proftick(p)
-       struct proc *p;
-{
-}
-
 /* End of clock.c */
diff -r d1daa790c2b3 -r ffc94774009d sys/arch/arm32/ofw/ofwgencfg_clock.c
--- a/sys/arch/arm32/ofw/ofwgencfg_clock.c      Tue Dec 12 05:35:48 2000 +0000
+++ b/sys/arch/arm32/ofw/ofwgencfg_clock.c      Tue Dec 12 06:06:05 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ofwgencfg_clock.c,v 1.7 2000/01/22 05:21:26 tsutsui Exp $      */
+/*     $NetBSD: ofwgencfg_clock.c,v 1.8 2000/12/12 06:06:06 mycroft Exp $      */
 
 /*
  * Copyright 1997
@@ -178,13 +178,6 @@
        (void)splx(s);          
 }
 
-
-void
-need_proftick(p)
-       struct proc *p;
-{
-}
-
 /*
  * Estimated loop for n microseconds
  */



Home | Main Index | Thread Index | Old Index