[PATCH v3 1/3] riscv: Add Linux hwprobe syscall support
Florian Weimer
fweimer@redhat.com
Wed Jun 28 05:13:38 GMT 2023
* Evan Green:
> diff --git a/sysdeps/unix/sysv/linux/riscv/sys/hwprobe.h b/sysdeps/unix/sysv/linux/riscv/sys/hwprobe.h
> new file mode 100644
> index 0000000000..49e27ee855
> +__BEGIN_DECLS
> +
> +#ifdef __USE_GNU
> +int
> +__riscv_hwprobe (struct riscv_hwprobe *pairs, size_t pair_count,
> + size_t cpu_count, unsigned long *cpus, unsigned int flags);
> +#endif
> +
> +__END_DECLS
This isn't a standard header, so you don't need to use __USE_GNU, you
can declare the function unconditionally. I suspect some of the
arguments can't be null pointers, so maybe use __nonnull, and probably
the access attributes as well. I also expect that the function can be
_THROW (it's not a cancellation point or planned to be in the future).
There are some style issues (“long” instead of “long int”, the
indentation in the quoted declaration, unusual (for glibc) comment
formatting, but the committer can clean those up before committing.
Thanks,
Florian
More information about the Libc-alpha
mailing list