This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 11/15] RISC-V: Linux ABI
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Palmer Dabbelt <palmer at dabbelt dot com>
- Cc: <libc-alpha at sourceware dot org>, Andrew Waterman <andrew at sifive dot com>, Darius Rad <darius at bluespec dot com>, <dj at redhat dot com>
- Date: Tue, 2 Jan 2018 20:59:46 +0000
- Subject: Re: [PATCH v2 11/15] RISC-V: Linux ABI
- Authentication-results: sourceware.org; auth=none
- References: <mhng-3e006265-a279-4741-8bbe-f58462766638@palmer-si-x1c4> <alpine.DEB.2.20.1801010059110.28505@digraph.polyomino.org.uk>
On Mon, 1 Jan 2018, Joseph Myers wrote:
> I see that in the latest port version you've renamed the function to
> __riscv_flush_icache. Whether that's appropriate depends on whether this
> function is intended to be used in libraries such as libgcc with namespace
> concerns - normally public APIs do not have the leading __ on the name of
> the public interface, but an __ name is needed in certain cases if the
> function is expected to be called from somewhere like libgcc.
I see GCC will now generate calls to __riscv_flush_icache - which, like
use in libgcc, is a reason that justifies having the leading __.
> I think this machine-specific interface, whatever the function ends up
> being called, needs documenting in the glibc manual - presumably in
> platform.texi, where sys/platform/ppc.h is already documented.
Given that you have an installed header declaring the function, and so
it's presumably intended for users and not *just* for compiler-generated
use (unlike a few functions in some configurations that really are just
for compiler use), this still applies - the API should be documented.
--
Joseph S. Myers
joseph@codesourcery.com