[parisc-linux] On the subject of POSIX timers.

Carlos O'Donell carlos at baldric.uwo.ca
Wed Apr 28 13:34:00 MDT 2004


parisc-linux,

When an si_code is negative in the kernel, it imagines the signal was
generated *from* userspace, it's the convention that positive si_code is
kernel generated signals.

POSIX Timers generate SI_TIMER, evaluating to -2, when the generic
kernel code examines this value, it tries a shortcut. If si_code < 0
(see kernel/signal.c (copy_siginfo_to_user)) then it doesn't retouch
the structure. However, in the compat case we *always* have to retouch
the structure to make it 32-bit correct.

Does anyone know why the shortcut "si_code < 0" is valid? Any thoughts?

Cheers,
Carlos.



More information about the parisc-linux mailing list