This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 09/15] RISC-V: Atomic and Locking Routines

On Tue, 19 Dec 2017, Palmer Dabbelt wrote:

> This patch implements various atomic and locking routines on RISC-V,
> either via the A extension (when present) or via a Linux system call
> that does a compare-and-exchange.  This contains both the library
> routines and the syscall wrapper.

You said in the introduction that the 'A' extension would be required for 
Linux.  I think you need to update the patch description - *and* the patch 
itself - to reflect that.

> diff --git a/sysdeps/riscv/rv64/rvd/s_roundeven.c b/sysdeps/riscv/rv64/rvd/s_roundeven.c

Does not belong in this patch.

> diff --git a/sysdeps/riscv/rv64/rvf/s_llrintf.c b/sysdeps/riscv/rv64/rvf/s_llrintf.c


> +#ifdef __riscv_atomic
> +
> +#define __HAVE_64B_ATOMICS (__riscv_xlen >= 64)

Missing preprocessor indentation.

> +/* Miscellaneous. */
> +
> +#define asm_amo(which, ordering, mem, value) ({ 		\

Likewise, in this part of the file.

> +#else /* __riscv_atomic */

And this part of the file should now just have a #error.  (Giving an error 
for non-A at configure time would be a good idea as well, so the bad 
configuration gets detected as early as possible.)

Joseph S. Myers

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]