[FFmpeg-devel] [PATCH] define _DARWIN_C_SOURCE for MAP_ANON

Alexander Strange astrange
Wed Jul 21 20:37:27 CEST 2010


On Wed, Jul 21, 2010 at 10:47 AM, Ramiro Polla <ramiro.polla at gmail.com> wrote:
> 2010/7/21 M?ns Rullg?rd <mans at mansr.com>:
>> Ramiro Polla <ramiro.polla at gmail.com> writes:
>>> 2010/7/21 M?ns Rullg?rd <mans at mansr.com>:
>>>> BTW, the dyncode thing is missing a cache sync operation.
>>>
>>> Could you please elaborate on this?
>>
>> After writing the code, the D-cache must be flushed and the I-cache
>> invalidated. ?There is usually no automatic coherency between them.
>
> Something like in attached patch? (not thoroughly tested, I'd just
> like to know if this is the right way to go). Is something equivalent
> needed for linux or will mprotect do it automatically?

sys_icache_invalidate doesn't do anything on x86.
x86 (at least Intel and AMD) don't even have an icache in the first
place, so they don't need to be flushe and I don't think could test
code to flush one.

http://opensource.apple.com/source/xnu/xnu-1504.7.4/osfmk/i386/commpage/cacheflush.s



More information about the ffmpeg-devel mailing list