[cfe-users] RFC v3: Re: cacheflush.2

Alejandro Colomar (man-pages) via cfe-users cfe-users at lists.llvm.org
Fri Dec 11 10:22:28 PST 2020


Hi all,

Please review this text:

[
NOTES
       Unless  you  need  the finer grained control that this system
       call provides, you probably want  to  use  the  GCC  built-in
       function  __builtin___clear_cache(),  which  provides  a more
       portable interface:

           void __builtin___clear_cache(void *begin, void *end);

       On platforms that don't require  instruction  cache  flushes,
       __builtin___clear_cache() has no effect.

       Note:  On  some  GCC-compatible compilers, such as clang, the
       prototype for this function uses char * instead of void *.
]

Thanks,

Alex

On 12/11/20 7:02 PM, Alejandro Colomar (man-pages) wrote:
> Hi Michael,
> 
> On 12/11/20 9:15 AM, Michael Kerrisk (man-pages) wrote:
>> i Alex,
>>
>> On 12/10/20 9:56 PM, Alejandro Colomar (man-pages) wrote:
>>> Hi all,
>>>
>>> v2:
>>>
>>> [
>>> NOTES
>>>        Unless  you  need  the finer grained control that this system
>>>        call provides, you probably want  to  use  the  GCC  built-in
>>>        function  __builtin___clear_cache(),  which  provides  a more
>>>        portable interface:
>>>
>>>            void __builtin___clear_cache(void *begin, void *end);
>>> ]
>>
>> This seems a reasonable text to me, but I think it would be helpful
>> to say a little more precisely what kind of portability we are
>> talking about here.
> Sure.
> 
>>
>> Greater ortability across Linux architectures? Greater portability
>> across platforms supported by GCC (including non-Linux) platforms?
>> Something else?
> 
> '... which provides a portable interface across platforms supported by
> GCC:' sounds good.
> 
> Maybe GCC devs have something more to add.

> 
> Thanks,
> 
> Alex
> 
>>
>> Thanks,
>>
>> Michael
>>
>>
> 

-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es


More information about the cfe-users mailing list