From owner-freebsd-usb@FreeBSD.ORG Fri Jul 23 13:36:16 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 B7119106566B for ; Fri, 23 Jul 2010 13:36:16 +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 51DA58FC08 for ; Fri, 23 Jul 2010 13:36:15 +0000 (UTC) Received: by wwe15 with SMTP id 15so4224146wwe.31 for ; Fri, 23 Jul 2010 06:36:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=H/iCFMziKHt5zw0s+hmhsN2TA3YjEKL5iqAui0JY1fw=; b=trpLHlQtp91v+iz0JIWucNxmJhO1S8eo5+UtUq7ljvGS7/uu4ARt5pWJNmccSiiE/y qlbb1oSmkboRxzd8p3WihPTgd7J3n6t7rCy5kruz91CDs+soUn7ubtdNsAPvwyeISds1 jLdGl3+Z2d3atVyvFN0W/br/Z7odKs2h8Z6Pk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=vWAAKVTFGLgO/zAbU7sBxkBuLOC6cLRjImLxPLy5W1WMNka2oFikXXl5YCgVsKtrXc 9jOf0MZhkTFKarAR7cSS7K/vwK7URXv39wTAQ08gSMBpW03JBgxpjP5Imvql0O9XdFbE BEGlx8ivosXC1mqI7G0Gushjs6wred9nzD/30= MIME-Version: 1.0 Received: by 10.227.128.144 with SMTP id k16mr3520539wbs.196.1279892174921; Fri, 23 Jul 2010 06:36:14 -0700 (PDT) Received: by 10.227.1.225 with HTTP; Fri, 23 Jul 2010 06:36:14 -0700 (PDT) Date: Fri, 23 Jul 2010 15:36:14 +0200 Message-ID: From: Peer Stritzinger To: freebsd-usb Content-Type: text/plain; charset=ISO-8859-1 Subject: 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 13:36:16 -0000 Hi, I'm using libusb to talk to a generic device (thats being also developed by me), synchronous works fine now. Asynchronous mode with blocking libusb_handle_events() works also. Now I'm trying to also talk to non USB file descriptors. For this I'm using select(2), filling the sets from libusb_get_pollfds() results. Somehow the select call never returns (no timeouts), if It gets some external trigger (like stopping in the debugger can continuing) it returns and has plausible return values. Looking into libusb I find that it uses poll(2) internally. Is select(2) supposed to work with libusb fd'? Should I rather use poll(2)? (I do like select more -- more BSDish). Best regards Peer Stritzinger