[MPlayer-dev-eng] [patch] try mmap(MAP_PRIVATE) fallback for no-mmu systems in fbdev vo

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon May 7 19:10:47 CEST 2007


Hello,
On Mon, May 07, 2007 at 12:52:02PM -0400, Mike Frysinger wrote:
> On 2/1/07, Rich Felker <dalias at aerifal.cx> wrote:
> > On Thu, Feb 01, 2007 at 11:10:26AM +0100, Reimar Döffinger wrote:
> > > > Benjamin Z., you are probably a better fit to test it, what  do you
> > > > think about it?
> > >
> > > Any why is MAP_SHARED used in the first place anyway? Actually, upon
> > > reading the documentation on mmap, I see no way this could work with
> > > MAP_PRIVATE unless they have a non-conforming mmap...
> >
> > I don't think MAP_PRIVATE is correct for mapping devices. It certainly
> > has strange behavior. MAP_SHARED _should_ work with devices on no-mmu
> > systems (actually with files too) but the ucLinux folks won't
> > implement it for some reason, even tho supporting it for devices is
> > just a matter of removing the "check-for-MAP_SHARED-and-fail" lines.
> >
> > In any case, the approach of trying MAP_SHARED first and falling back
> > to MAP_PRIVATE is fine IMO.
> 
> patch ping ?  this patch still applies cleanly to current trunk ...

And it also still contains cosmetics that must be done separately.
Though not a big problem, but it also still is unclear why you want to
fix this in MPlayer instead of the mmap implementation which seems to be
broken, since without MMU it should fail with MAP_PRIVATE, not MAP_SHARED
according to the documentation.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list