From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 18 17:21:15 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 E97C7106566C for ; Sun, 18 Sep 2011 17:21:15 +0000 (UTC) (envelope-from uffe@uffe.org) Received: from mail.starion.dk (mx0.starion.dk [93.162.70.34]) by mx1.freebsd.org (Postfix) with SMTP id 30F6A8FC1C for ; Sun, 18 Sep 2011 17:21:14 +0000 (UTC) Received: (qmail 1587 invoked by uid 1004); 18 Sep 2011 16:54:41 -0000 Message-ID: <4E76221D.50605@uffe.org> Date: Sun, 18 Sep 2011 18:53:49 +0200 From: Uffe Jakobsen X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; DSN=0; uuencode=0 User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Mnenhy/0.8.3 Thunderbird/3.1.13 MIME-Version: 1.0 To: hackers@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Richard Yao Subject: Re: 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 17:21:16 -0000 On 2011-09-18 17:32, Richard Yao wrote: > 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? > How about pthread_self() ? /Uffe