From owner-cvs-all@FreeBSD.ORG Sun Aug 19 14:44:18 2007 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 823A216A417; Sun, 19 Aug 2007 14:44:18 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 20FDF13C483; Sun, 19 Aug 2007 14:44:18 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.1/8.14.1/NETPLEX) with ESMTP id l7JEi9VL013246; Sun, 19 Aug 2007 10:44:09 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-3.0 (mail.netplex.net [204.213.176.10]); Sun, 19 Aug 2007 10:44:10 -0400 (EDT) Date: Sun, 19 Aug 2007 10:44:09 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Robert Watson In-Reply-To: <20070819092923.X65240@fledge.watson.org> Message-ID: References: <200708160526.l7G5Qg0b008022@repoman.freebsd.org> <46C4FD02.3090708@freebsd.org> <200708182118.37998.tijl@ulyssis.org> <20070818204223.D1234@fledge.watson.org> <250D8A54B98F12158C71D8FE@ganymede.hub.org> <20070819092923.X65240@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: wine-freebsd@hub.org, src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org, "Marc G. Fournier" , David Xu , Tijl Coosemans , Xin LI Subject: Re: cvs commit: src/sys/kern kern_thr.c syscalls.master src/sys/sys X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Aug 2007 14:44:18 -0000 On Sun, 19 Aug 2007, Robert Watson wrote: > On Sat, 18 Aug 2007, Daniel Eischen wrote: > >>> Stupid question, but ... why not? >>> >>> First off, do you know for a fact that Wine is the only app out there that >>> needs the ability to kill off a thread in a seperate process, or has >>> nobody in the past cared enough to see other apps ported from Linux -> >>> FreeBSD to push for this sort of thing? >> >> FreeBSD as well as Solaris and Linux (it looks like Linux only allows a >> thread group to be signaled) have gotten along without this API, and Wine >> seems to be the only target for this syscall. > > While I'm not familiar with the newer pthread code on Linux, I can say with > reasonable authority that the older implementation used the same ID space for > pids and thread IDs, since threads were tasks, and therefore Linux has always > supported directly signalling threads in other processes. Thread id's (as visible to an application) are not required to be something that is known by the kernel. They certainly are not in libkse and libc_r, and I don't think they are in libthr either. This API won't work with libkse (or libc_r if we care) and isn't guaranteed to work with any future libthreadX. POSIX has well defined behavior with regard to signaling, and this certainly bypasses that. If we want to add a more well thought out set of APIs for thread groups that can (in the future) support CPU binding and scheduling, then that's OK. But the API as committed is a hack that solves one particular problem that can be solved in other (more portable) ways. sigqueue() was mentioned as a possible solution earlier. -- DE