Re: [Yaffs] BG GC with FreeRtos

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: markus.bargehr
CC: yaffs
Subject: Re: [Yaffs] BG GC with FreeRtos
On Fri, Oct 26, 2018 at 12:46 AM Markus Bargehr <
> wrote:

> Hello,
>
>
>
> i’m new on Yaffs and now I ahve implemented Yaffs2 on an embedded System
> with FreeRTOS as OS.
>
> It looks like that Yaffs work’s good. In some documentations I have read
> that it would be good to have a BG GC which should run every 2-5 seconds.
>
> Is there someone which could show me an example code how such a BG GC Taks
> in FreeRTOS could kook like?
>
>
>
> Regards
>
> Markus
>
>
>


Hello Markus

Have a look in the Yaffs VFS code to see how it is done in Linux.
http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blob;f=yaffs_vfs_multi.c;h=de3dd75988ef7de715fd80ec28ff6b96e501a903;hb=HEAD#l2137

Pretty straight forward: Just set up a thread with the proper locking that
occasionally calls

urgency = yaffs_bg_gc_urgency(dev);
gc_result = yaffs_bg_gc(dev, urgency);

Regards

Charles


_______________________________________________
> yaffs mailing list
>
> http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs
>