From: Thomas Gleixner Date: Sun, 31 Aug 2008 15:16:57 +0000 (-0700) Subject: select: add poll_select_set_timeout() and poll_select_copy_remaining() helpers X-Git-Tag: v2.6.28-rc1~18^2^2~28 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b773ad40aca5bd755ba886620842f16e8fef6d75;p=pandora-kernel.git select: add poll_select_set_timeout() and poll_select_copy_remaining() helpers This patch adds 2 helpers that will be used for the hrtimer based select/poll: poll_select_set_timeout() is a helper that takes a timeout (as a second, nanosecond pair) and turns that into a "struct timespec" that represents the absolute end time. This is a common operation in the many select() and poll() variants and needs various, common, sanity checks. poll_select_copy_remaining() is a helper that takes care of copying the remaining time to userspace, as select(), pselect() and ppoll() do. This function comes in both a natural and a compat implementation (due to datastructure differences). Signed-off-by: Thomas Gleixner Signed-off-by: Arjan van de Ven --- Reading git-diff-tree failed