> On 18/03/07, Timo Horstschäfer <[EMAIL PROTECTED]> wrote:> > Jonathan Gordon
> wrote:> > > > >Timo Horstschäfer wrote:> > > > >I think some kind of a disk
> write-queue would achieve the same.> > > > >Or maybe just a global write
> buffer, that flushes on every disk spin up.> > > >> > > > Thats surely a
> better idea, and i think it could be used in general, not> > > > only in
> plugins. Would it be hard to code?> > >> > > This exists already, but isnt
> really useable in the current form for> > > plugins. The way it works is a
> function registers a callback for when the> > > disk is going to spin down...
> but this wont work for functions because they> > > may not be in memory at
> that point anymore.> > A write-buffer would be independant from plugins. The
> write function would> > just return immediately and I think it's causing the
> hang when exiting a> > plugin.> > Also the write-buffer may slightly increase
> the battery runtime because of> > less disk spin ups.> >> Right, we already
> do this, but in a more powerful way than just a> single buffer. The downside
> is we cant use it for plugins...>
But is such a buffer hard to implement in the plugin API? I think it would be
cool to implement it as a seperate function, with a name which indicated that
it _didn't_ locked.
Maybe a seperate buffer could be maked upon the startup of rockbox OR the
startup of any plugin which needed non-locking file writing
(FILEWRITE_NONLOCKING_DECLARE ). It could the be cleared or deleted on plugin
exit if needed (_after_ the disk writes was done!).
Jonashn
_________________________________________________________________
Windows Live Spaces er her! Du kan nemt oprette dit eget personlige websted.
http://spaces.live.com/signup.aspx