Date: Sat, 18 Aug 2007 20:45:35 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: Tijl Coosemans <tijl@ulyssis.org> Cc: wine-freebsd@hub.org, src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org, Daniel Eischen <deischen@freebsd.org>, David Xu <davidxu@freebsd.org>, Xin LI <delphij@delphij.net> Subject: Re: cvs commit: src/sys/kern kern_thr.c syscalls.master src/sys/sys thr.h Message-ID: <20070818204223.D1234@fledge.watson.org> In-Reply-To: <200708182118.37998.tijl@ulyssis.org> References: <200708160526.l7G5Qg0b008022@repoman.freebsd.org> <46C4FD02.3090708@freebsd.org> <Pine.GSO.4.64.0708162216530.1396@sea.ntplx.net> <200708182118.37998.tijl@ulyssis.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070818204223.D1234>