From owner-freebsd-current Thu Oct 25 11:35:12 2001 Delivered-To: freebsd-current@freebsd.org Received: from iguana.aciri.org (iguana.aciri.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id 63A2B37B406 for ; Thu, 25 Oct 2001 11:35:01 -0700 (PDT) Received: (from rizzo@localhost) by iguana.aciri.org (8.11.3/8.11.1) id f9PIVd657331; Thu, 25 Oct 2001 11:31:39 -0700 (PDT) (envelope-from rizzo) Date: Thu, 25 Oct 2001 11:31:39 -0700 From: Luigi Rizzo To: current@freebsd.org Subject: where is the idle_loop in current ? Message-ID: <20011025113139.A56942@iguana.aciri.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.23i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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