From owner-freebsd-current@FreeBSD.ORG Tue Aug 30 00:45:13 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E333106566B; Tue, 30 Aug 2011 00:45:13 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate.funkthat.com [70.36.235.232]) by mx1.freebsd.org (Postfix) with ESMTP id 6A8478FC12; Tue, 30 Aug 2011 00:45:13 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id p7U0NJFA071539 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 29 Aug 2011 17:23:19 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id p7U0NFXL071537; Mon, 29 Aug 2011 17:23:15 -0700 (PDT) (envelope-from jmg) Date: Mon, 29 Aug 2011 17:23:15 -0700 From: John-Mark Gurney To: Luigi Rizzo Message-ID: <20110830002315.GD3098@funkthat.com> Mail-Followup-To: Luigi Rizzo , John Baldwin , freebsd-current@freebsd.org References: <20110826153940.GA3800@onelab2.iet.unipi.it> <201108261313.03441.jhb@freebsd.org> <20110826210101.GA5822@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110826210101.GA5822@onelab2.iet.unipi.it> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Mon, 29 Aug 2011 17:23:19 -0700 (PDT) X-Mailman-Approved-At: Tue, 30 Aug 2011 01:19:14 +0000 Cc: freebsd-current@freebsd.org Subject: Re: kqueue and device driver experience anyone ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Aug 2011 00:45:13 -0000 Luigi Rizzo wrote this message on Fri, Aug 26, 2011 at 23:01 +0200: > The other thing i need (but i believe i know how to handle it) > is tell whether .f_event() is called by KNOTE() or by kqueue_scan(), > but i believe i can use the "hint" argument to tell the two. Why do you need to know the difference? kqueue is a level triggered API, and so should behave the same if it is called from KNOTE or kqueue_scan... The reason it is called from kqueue_scan is to ensure that the condition (level) still exists, and to get updated data information (like how many bytes are available for reading)... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."