linux-user: Add support for utimensat_time64() and semtimedop_time64()
commitcac46eb021fbbac77f1f98223b19608f31fc2236
authorFilip Bozuta <Filip.Bozuta@syrmia.com>
Mon, 24 Aug 2020 22:30:50 +0000 (25 00:30 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Fri, 28 Aug 2020 13:24:42 +0000 (28 15:24 +0200)
tree05bbb65b371d3bd4e647e3ba88a4de46620f94f6
parentddcbde157d66f7ee53d9789cf605ebaa4be0745e
linux-user: Add support for utimensat_time64() and semtimedop_time64()

This patch introduces functionality for following time64 syscalls:

*utimensat_time64()

    int utimensat(int dirfd, const char *pathname,
                  const struct timespec times[2], int flags);
    -- change file timestamps with nanosecond precision --
    man page: https://man7.org/linux/man-pages/man2/utimensat.2.html

*semtimedop_time64()

    int semtimedop(int semid, struct sembuf *sops, size_t nsops,
                   const struct timespec *timeout);
    -- System V semaphore operations --
    man page: https://www.man7.org/linux/man-pages/man2/semtimedop.2.html

Implementation notes:

   Syscall 'utimensat_time64()' is implemented in similar way as its
   regular variants only difference being that time64 converting function
   is used to convert values of 'struct timespec' between host and target
   ('target_to_host_timespec64()').

   For syscall 'semtimedop_time64()' and additional argument is added
   in function 'do_semtimedop()' through which the aproppriate 'struct timespec'
   converting function is called (false for regular target_to_host_timespec()
   and true for target_to_host_timespec64()). For 'do_ipc()' a
   check was added as that additional argument: 'TARGET_ABI_BITS == 64'.

Signed-off-by: Filip Bozuta <Filip.Bozuta@syrmia.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20200824223050.92032-3-Filip.Bozuta@syrmia.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/syscall.c