|
From: Tom H. <to...@co...> - 2005-11-13 15:01:35
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
> > Preserve the sign of the bottom 16 bits of si_code when discarding
> > the top 16 bits - the pthread library uses negative code values in
> > the signals it sends between threads.
>
> This was presumably the cause of the pth_cancel{1,2} failures?
Certainly pth_cancel2 yes.
> Would it be safer not to modify the top 16 bits at all, but rather
> to mask them just at the relevant use points?
In some way, yes. The advantage of current solution is that it
carries on working in a years time when somebody adds a new bit of
code that looks at si_code and forgets to mask it.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|