From owner-freebsd-usb@FreeBSD.ORG Fri Jul 23 17:12:47 2010 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA0061065675 for ; Fri, 23 Jul 2010 17:12:47 +0000 (UTC) (envelope-from peerst@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 710CA8FC12 for ; Fri, 23 Jul 2010 17:12:47 +0000 (UTC) Received: by wwe15 with SMTP id 15so4476399wwe.31 for ; Fri, 23 Jul 2010 10:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=+pJlHvR3YKoqKwruuq0wt0Yz6Ycpl8NZ1DOoVH6hBGM=; b=JGjbnD3iI1nrC9FBJEx2JDyPgEw45lQhxmjeSCaYGIuoxVEzMNzStwVUWFcEzKvPfL 8jK5k/HeZRtVwpraH4nTQCs0KpvLU7jOvINVUCDAl3H8WNvKcJW2j5ahpkuTBayBv4C9 1A8HPvCFPP76MTwCmvj+/n/hxUSWaLGqFO3AQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=fFvr2tjfY/9MIDptsndZ6sYIr+tcitfd0eXUb+6ptnQ1McruNMKn2D0l9feeCZQgNt Xuo30DKtc+6CuCaWgukr8Etcq0sm1W2oc6GWoklYvYksSDPh5ACSOeGUkENUatB5drQO 2RbnJRA6mAGBd/fSQiMtrYUZoh4X4k1tmQFnM= MIME-Version: 1.0 Received: by 10.227.128.144 with SMTP id k16mr3789404wbs.196.1279905166246; Fri, 23 Jul 2010 10:12:46 -0700 (PDT) Received: by 10.227.1.225 with HTTP; Fri, 23 Jul 2010 10:12:46 -0700 (PDT) In-Reply-To: <201007231657.47682.hselasky@c2i.net> References: <201007231657.47682.hselasky@c2i.net> Date: Fri, 23 Jul 2010 19:12:46 +0200 Message-ID: From: Peer Stritzinger To: Hans Petter Selasky Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-usb@freebsd.org Subject: Re: FreeBSD 8: libusb async mode + select(2) = nogo? X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 17:12:47 -0000 Hi, On Fri, Jul 23, 2010 at 4:57 PM, Hans Petter Selasky wrote: > > What are the polling flags you are using? Do you mean the libusb_pollfd entries? They are: {fd = 0x7, events = 0x1} {fd = 0xc, events = 0x45} I translate these into select(2) params like this: nfds = 0xc, readfds = {__fds_bits = {0x1080, 0x0 }}, writefds = {__fds_bits = {0x1000, 0x0 }}, exceptfds = { __fds_bits = {0x0 }}, And call select with timeout = NULL (since libusb_get_next_timeout returned 0) Regards -- Peer