On Fri, Oct 26, 2018 at 12:46 AM Markus Bargehr <markus.bargehr@gantnersolutions.com> 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
yaffs@stoneboat.aleph1.co.uk
http://stoneboat.aleph1.co.uk/cgi-bin/mailman/listinfo/yaffs