From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 18 16:03:45 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 086CF106566B for ; Sun, 18 Sep 2011 16:03:45 +0000 (UTC) (envelope-from shiningarcanine@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 927A18FC0A for ; Sun, 18 Sep 2011 16:03:44 +0000 (UTC) Received: by wwe3 with SMTP id 3so6510264wwe.31 for ; Sun, 18 Sep 2011 09:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=1m8WHggyLiDo//jkQ5MWUgt/uwzaeQO8iwGUFoZaVSo=; b=KBkqv0kdRphLF1ctH8QuG5+n6DWj4/6DxMXaUm+R7vw87cMbfJGe13YwQgCcXiE+RH kvCGBf7f+4gpJXe7JH6cico5rJFBst0gvo5v9/ue9r3wU7psbJbWW3MAPE7ch4cgEt94 LX+AKdcx1ersVTVvTbaknJpDXjHxqlNPFSs6Q= MIME-Version: 1.0 Received: by 10.216.182.197 with SMTP id o47mr1519313wem.78.1316359928355; Sun, 18 Sep 2011 08:32:08 -0700 (PDT) Sender: shiningarcanine@gmail.com Received: by 10.216.171.80 with HTTP; Sun, 18 Sep 2011 08:32:08 -0700 (PDT) Date: Sun, 18 Sep 2011 11:32:08 -0400 X-Google-Sender-Auth: KYqL6yYg67ZeEi9SWrKNE9ADF7w Message-ID: From: Richard Yao To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Mailman-Approved-At: Sun, 18 Sep 2011 16:17:36 +0000 Cc: Subject: Mixing Asynchronous Network I/O and POSIX Threads X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2011 16:03:45 -0000 Dear FreeBSD Community: I wrote a program for Linux that uses Asynchronous Network I/O and POSIX Threads. It uses a mix of gettid(), fcntl() and F_SETOWN to specify which thread handles each connection's SIGIO interrupts. gettid() is Linux-specific and I would prefer to do this in a way that also works with FreeBSD. Is that possible? I am not on the mailing list. Please CC me any responses. Yours truly, Richard Yao