From owner-freebsd-threads@FreeBSD.ORG Mon Aug 15 17:30:13 2011 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB1CB106567B; Mon, 15 Aug 2011 17:30:13 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 25B478FC1F; Mon, 15 Aug 2011 17:30:10 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id AFE6146B32; Mon, 15 Aug 2011 13:30:09 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 502AE8A02E; Mon, 15 Aug 2011 13:30:09 -0400 (EDT) From: John Baldwin To: freebsd-threads@freebsd.org Date: Mon, 15 Aug 2011 13:10:49 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <4E44E326.9070405@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201108151310.49272.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Mon, 15 Aug 2011 13:30:09 -0400 (EDT) Cc: Subject: Re: Urgent interrupt thread X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Aug 2011 17:30:14 -0000 On Friday, August 12, 2011 4:59:18 am Ninad Adi wrote: > Thanks for your prompt replies sir, > just one more clarification > > the routine bus_setup_intr has 5th arg of > type driver_intr_t ithread then if I am not > wrong my isr is running as a thread, probably > thats the reason why latest drivers dont use > Deferring mechanism like iwi, iwn, ral. However > Atheros is still using taskqueues which is considerably old I suppose. > So using filter+ithread model without deferring > Should be fine. > Plz let me know your opinions on the same, > It would help me understand freebsd better. > Will not disturb you more. > Awaiting,reply You should just use the 'driver_intr_t' method which will be a function that runs in an ithread. It cannot sleep in that it cannot call functions like tsleep() or cv_wait() or use "sleepable" locks like sx(9) locks. It can, however, use other locks such as mutexes and rwlocks. It can also wakeup other sleeping threads using cv_signal/broadcast, wakeup(), etc. In general you probably don't need to use a filter routine. -- John Baldwin