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

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to