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

Reimar Döffinger Reimar.Doeffinger
Wed Jul 21 20:25:19 CEST 2010

On Wed, Jul 21, 2010 at 02:47:00PM -0300, Ramiro Polla 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?

Seems much simpler for me to use a MFENCE and a loop with CLFLUSH.
Of course I don't know if CLFLUSH might not be available on some MMX-capable
CPUs, but it seems hard to imagine.

More information about the ffmpeg-devel mailing list