From owner-freebsd-hackers Wed Jul 2 00:12:04 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id AAA18438 for hackers-outgoing; Wed, 2 Jul 1997 00:12:04 -0700 (PDT) Received: from sendero-ppp.i-connect.net (sendero-ppp.i-Connect.Net [206.190.143.100]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id AAA18410 for ; Wed, 2 Jul 1997 00:11:53 -0700 (PDT) Received: (qmail 838 invoked by uid 1000); 2 Jul 1997 07:06:46 -0000 Message-ID: X-Mailer: XFMail 1.2-alpha [p0] on FreeBSD X-PRIORITY: 2 (High) Priority: urgent Content-Type: text/plain; charset=iso-8859-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Date: Wed, 02 Jul 1997 00:06:46 -0700 (PDT) Organization: Atlas Telecom From: Simon Shapiro To: freebsd-hackers@freebsd.org Subject: timeout/untimeout - How? Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I KNOW I am doing something foolish. But what? [at the beginning of a driver] ... static void dpt_timeout_losers(void *dpt); ... [in dpt_scsi_cmd] ... ospl = splbio(); if ( !(dpt->state & DPT_STATE_LOSERS_TIMEOUT_SET) ) { dpt->state |= DPT_STATE_LOSERS_TIMEOUT_SET; timeout((timeout_func_t)dpt_timeout_losers, dpt, hz * 10); } splx(ospl); ... static void dpt_timeout_losers(void *arg) { dpt_softc_t *dpt = (dpt_softc_t *)arg; if ( !(dpt->state & DPT_STATE_LOSERS_TIMEOUT_ACTIVE) ) dpt_abort_losers(dpt); timeout((timeout_func_t)dpt_timeout_losers, (caddr_t)dpt, hz * 10); } What I am trying to do is have the function dpt_abort_losers() run once every 10 seconds. (Please don't ask why - nasty hardware problems) What I am getting is a panic due to timeout table being full. Where is my stupidity? Simon