signal: introduce do_sigtimedwait() to factor out compat/native code
authorOleg Nesterov <oleg@redhat.com>
Wed, 27 Apr 2011 19:44:14 +0000 (21:44 +0200)
committerOleg Nesterov <oleg@redhat.com>
Thu, 28 Apr 2011 11:01:38 +0000 (13:01 +0200)
commit943df1485a8ff0e600729e082e568ece04d4de9e
treed2d4b7b41f163e011cb7a373376c9ae87e5941be
parentfe0faa005d43bc44c357631d51c273806086caa4
signal: introduce do_sigtimedwait() to factor out compat/native code

Factor out the common code in sys_rt_sigtimedwait/compat_sys_rt_sigtimedwait
to the new helper, do_sigtimedwait().

Add the comment to document the extra tick we add to timespec_to_jiffies(ts),
thanks to Linus who explained this to me.

Perhaps it would be better to move compat_sys_rt_sigtimedwait() into
signal.c under CONFIG_COMPAT, then we can make do_sigtimedwait() static.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Matt Fleming <matt.fleming@linux.intel.com>
include/linux/signal.h
kernel/compat.c
kernel/signal.c