public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Alistair Francis <alistair23@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] RISC-V: Use 64-bit-time syscall numbers with the 32-bit port
Date: Thu, 27 Aug 2020 18:36:44 +0000 (GMT)	[thread overview]
Message-ID: <20200827183644.6399A3870879@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7ed05adc829c1b3690080c693888287255b7322b

commit 7ed05adc829c1b3690080c693888287255b7322b
Author: Alistair Francis <alistair.francis@wdc.com>
Date:   Tue Jun 25 16:32:38 2019 -0700

    RISC-V: Use 64-bit-time syscall numbers with the 32-bit port
    
    sysdep.h redefines only the syscall where the generic implementation
    still does not have actual 64-bit time_t support:
    
       /* Workarounds for generic code needing to handle 64-bit time_t.  */
    
       /* Fix sysdeps/unix/sysv/linux/clock_getcpuclockid.c.  */
       #define __NR_clock_getres    __NR_clock_getres_time64
       /* Fix sysdeps/nptl/lowlevellock-futex.h.  */
       #define __NR_futex           __NR_futex_time64
       [...]
    
    This patch also adds a comment that it is a workaround to handle 64-bit
    time_t and on each #define comment for which implementation it intends
    to.
    
    Reviewed-by: Maciej W. Rozycki <macro@wdc.com>

Diff:
---
 sysdeps/unix/sysv/linux/riscv/sysdep.h | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h
index fbb3a02bbd..430fa23a58 100644
--- a/sysdeps/unix/sysv/linux/riscv/sysdep.h
+++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h
@@ -25,6 +25,29 @@
 #undef SYS_ify
 #define SYS_ify(syscall_name)	__NR_##syscall_name
 
+#if __WORDSIZE == 32
+
+/* Workarounds for generic code needing to handle 64-bit time_t.  */
+
+/* Fix sysdeps/unix/sysv/linux/clock_getcpuclockid.c.  */
+#define __NR_clock_getres	__NR_clock_getres_time64
+/* Fix sysdeps/nptl/lowlevellock-futex.h.  */
+#define __NR_futex		__NR_futex_time64
+/* Fix sysdeps/unix/sysv/linux/pause.c.  */
+#define __NR_ppoll		__NR_ppoll_time64
+/* Fix sysdeps/unix/sysv/linux/select.c.  */
+#define __NR_pselect6		__NR_pselect6_time64
+/* Fix sysdeps/unix/sysv/linux/recvmmsg.c.  */
+#define __NR_recvmmsg		__NR_recvmmsg_time64
+/* Fix sysdeps/unix/sysv/linux/sigtimedwait.c.  */
+#define __NR_rt_sigtimedwait	__NR_rt_sigtimedwait_time64
+/* Fix sysdeps/unix/sysv/linux/semtimedop.c.  */
+#define __NR_semtimedop		__NR_semtimedop_time64
+/* Hack sysdeps/unix/sysv/linux/generic/utimes.c.  */
+#define __NR_utimensat		__NR_utimensat_time64
+
+#endif /* __WORDSIZE == 32 */
+
 #ifdef __ASSEMBLER__
 
 # include <sys/asm.h>


                 reply	other threads:[~2020-08-27 18:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200827183644.6399A3870879@sourceware.org \
    --to=alistair23@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).