mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
nanosleep: Use get_timespec64() and put_timespec64()
Usage of these apis and their compat versions makes the syscalls: clock_nanosleep and nanosleep and their compat implementations simpler. This is a preparatory patch to isolate data conversions to struct timespec64 at userspace boundaries. This helps contain the changes needed to transition to new y2038 safe types. Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
5c4994102f
commit
c0edd7c9ac
5 changed files with 26 additions and 38 deletions
|
@ -1314,12 +1314,8 @@ static int do_cpu_nanosleep(const clockid_t which_clock, int flags,
|
|||
*/
|
||||
restart = ¤t->restart_block;
|
||||
restart->nanosleep.expires = expires;
|
||||
if (restart->nanosleep.type != TT_NONE) {
|
||||
struct timespec ts;
|
||||
|
||||
ts = timespec64_to_timespec(it.it_value);
|
||||
error = nanosleep_copyout(restart, &ts);
|
||||
}
|
||||
if (restart->nanosleep.type != TT_NONE)
|
||||
error = nanosleep_copyout(restart, &it.it_value);
|
||||
}
|
||||
|
||||
return error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue