mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 23:52:40 +00:00
hrtimer: use nanosleep specific restart_block fields
Convert all the nanosleep related users of restart_block to the new nanosleep specific restart_block fields. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
a332d86d3c
commit
029a07e031
2 changed files with 13 additions and 15 deletions
|
@ -1354,13 +1354,13 @@ long __sched hrtimer_nanosleep_restart(struct restart_block *restart)
|
|||
struct hrtimer_sleeper t;
|
||||
struct timespec __user *rmtp;
|
||||
|
||||
hrtimer_init(&t.timer, restart->arg0, HRTIMER_MODE_ABS);
|
||||
t.timer.expires.tv64 = ((u64)restart->arg3 << 32) | (u64) restart->arg2;
|
||||
hrtimer_init(&t.timer, restart->nanosleep.index, HRTIMER_MODE_ABS);
|
||||
t.timer.expires.tv64 = restart->nanosleep.expires;
|
||||
|
||||
if (do_nanosleep(&t, HRTIMER_MODE_ABS))
|
||||
return 0;
|
||||
|
||||
rmtp = (struct timespec __user *)restart->arg1;
|
||||
rmtp = restart->nanosleep.rmtp;
|
||||
if (rmtp) {
|
||||
int ret = update_rmtp(&t.timer, rmtp);
|
||||
if (ret <= 0)
|
||||
|
@ -1394,10 +1394,9 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp,
|
|||
|
||||
restart = ¤t_thread_info()->restart_block;
|
||||
restart->fn = hrtimer_nanosleep_restart;
|
||||
restart->arg0 = (unsigned long) t.timer.base->index;
|
||||
restart->arg1 = (unsigned long) rmtp;
|
||||
restart->arg2 = t.timer.expires.tv64 & 0xFFFFFFFF;
|
||||
restart->arg3 = t.timer.expires.tv64 >> 32;
|
||||
restart->nanosleep.index = t.timer.base->index;
|
||||
restart->nanosleep.rmtp = rmtp;
|
||||
restart->nanosleep.expires = t.timer.expires.tv64;
|
||||
|
||||
return -ERESTART_RESTARTBLOCK;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue