Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Oct 2001 11:31:39 -0700
From:      Luigi Rizzo <rizzo@aciri.org>
To:        current@freebsd.org
Subject:   where is the idle_loop in current ?
Message-ID:  <20011025113139.A56942@iguana.aciri.org>

next in thread | raw e-mail | index | archive | help
I have some code (in stable) which is invoked from the idle
loop, see below. I was trying to port it to CURRENT, but
cannot find where the idle_loop (or idlethread ?) has gone.
Any pointers ? A grep for idlethread did not return
anything that i could parse.

Furthermore, what kind of locking should i use instead of
splimp() (the procedures called by ether_input() are a
stripped down, bounded-execution-time version of the
interrupt service routines for ethernet adapters).

	thanks
	luigi

--- i386/i386/swtch.s   2001/07/26 02:29:10     1.89.2.4
+++ i386/i386/swtch.s   2001/10/23 04:00:27
@@ -246,6 +246,15 @@
        call    _procrunnable
        testl   %eax,%eax
        CROSSJUMP(jnz, sw1a, jz)
+#ifdef XORP_ETHER_POLLING  
+       incl    idle_done
+       call    ether_poll
+       sti
+       nop
+       cli
+       testl   %eax, %eax
+       jnz     idle_loop
+#endif
        call    _vm_page_zero_idle
        testl   %eax, %eax
        jnz     idle_loop


--- i386/isa/intr_machdep.c     2001/08/24 17:39:12     1.29.2.3
+++ i386/isa/intr_machdep.c     2001/10/24 02:03:55

int
+ether_poll(void)
+{
+    static int i;
+
+    int s = splimp();
+    if (i >= pr_next)
+       i = 0 ;
+    if (pr[i].handler)
+       (*pr[i].handler)(pr[i].argument, 2);
+    i++ ;
+    splx(s);
+    return 1; /* more polling */
+}
	

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011025113139.A56942>