OSDN Git Service

linux-user: Add support for 'rt_sigtimedwait_time64()' and 'sched_rr_get_interval_tim...
authorFilip Bozuta <Filip.Bozuta@syrmia.com>
Mon, 24 Aug 2020 19:21:16 +0000 (21:21 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 28 Aug 2020 13:24:42 +0000 (15:24 +0200)
commitddcbde157d66f7ee53d9789cf605ebaa4be0745e
treee55c83a906887d18986b01246bc94f4d7b7f015d
parent6ac03b2cacbadbaf631ca16582f0e9b716653a32
linux-user: Add support for 'rt_sigtimedwait_time64()' and 'sched_rr_get_interval_time64()'

This patch implements functionality for following time64 syscalls:

*rt_sigtimedwait_time64()

    This is a year 2038 safe variant of syscall:

    int rt_sigtimedwait(const sigset_t *set, siginfo_t *info,
                        const struct timespec *timeout, size_t sigsetsize)
    --synchronously wait for queued signals--
    man page: https://man7.org/linux/man-pages/man2/rt_sigtimedwait.2.html

*sched_rr_get_interval_time64()

    This is a year 2038 safe variant of syscall:

    int sched_rr_get_interval(pid_t pid, struct timespec *tp)
    --get  the  SCHED_RR  interval  for the named process--
    man page: https://man7.org/linux/man-pages/man2/sched_rr_get_interval.2.html

Implementation notes:

    These syscalls were implemented in similar ways like
    'rt_sigtimedwait()' and 'sched_rr_get_interval()' except
    that functions 'target_to_host_timespec64()' and
    'host_to_target_timespec64()' were used to convert values
    of 'struct timespec' between host and target.

Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200824192116.65562-3-Filip.Bozuta@syrmia.com>
[lv: add missing defined(TARGET_NR_rt_sigtimedwait_time64)]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/syscall.c