From owner-cvs-all@FreeBSD.ORG Sat Aug 18 19:45:36 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 3FF8916A417; Sat, 18 Aug 2007 19:45:36 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 074CE13C4D1; Sat, 18 Aug 2007 19:45:36 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id 8A15947080; Sat, 18 Aug 2007 15:45:35 -0400 (EDT) Date: Sat, 18 Aug 2007 20:45:35 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Tijl Coosemans In-Reply-To: <200708182118.37998.tijl@ulyssis.org> Message-ID: <20070818204223.D1234@fledge.watson.org> References: <200708160526.l7G5Qg0b008022@repoman.freebsd.org> <46C4FD02.3090708@freebsd.org> <200708182118.37998.tijl@ulyssis.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, Daniel Eischen , David Xu , Xin LI Subject: Re: cvs commit: src/sys/kern kern_thr.c syscalls.master src/sys/sys thr.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Aug 2007 19:45:36 -0000 On Sat, 18 Aug 2007, Tijl Coosemans wrote: > To be honest, I'm not entirely fond of adding this syscall either, but from > an engineering point of view, it's really the easiest and cheapest solution > right now. > > POSIX message queues aren't needed. Sigqueue() with sigval set to the thread > id would be enough. Then whichever thread receives the signal can either > handle it or dispatch it using thr_kill(). > > Sigqueue() doesn't exist in 6-STABLE though and as I understood will never > be MFC'd, because it involves too many other things (signal queueing, > ksiginfo,...), whereas thr_kill2() is entirely isolated and trivial to > merge. > > Perhaps it should be stressed in documentation that this syscall is only > meant for Wine and to be removed at some point when better solutions become > available. I want to test this sigqueue solution some more, because the > indirection in signal delivery causes trouble when a thread signals itself. > I guess this would have to be special-cased somehow then. As a general rule, removing system calls is discouraged as it breaks backward compatibility allowing newer kernels to run older applications, so I think we should avoid adding a system call with the intent to remove it in mind at the time it's added :-). While thr_kill2() is imperfect from several perspectives, it is certainly a minimalist and logical construction that can be easily understood, and that's pretty valuable. Robert N M Watson Computer Laboratory University of Cambridge