projects
/
yaffs2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
0376d8e
)
Fix sleep logic in background gc thread example
author
Charles Manning
<cdhmanning@gmail.com>
Tue, 1 Jun 2021 23:28:43 +0000
(11:28 +1200)
committer
Charles Manning
<cdhmanning@gmail.com>
Tue, 1 Jun 2021 23:28:43 +0000
(11:28 +1200)
The logic to sleep longer was the wrong way around.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
direct/test-framework/yaffs_osglue.c
patch
|
blob
|
history
diff --git
a/direct/test-framework/yaffs_osglue.c
b/direct/test-framework/yaffs_osglue.c
index 2cc18bbdcb6bdec25eafef419df5caac894ed42a..94ca24dfd225a73bde9924f6c51a73672ed1c89b 100644
(file)
--- a/
direct/test-framework/yaffs_osglue.c
+++ b/
direct/test-framework/yaffs_osglue.c
@@
-106,7
+106,13
@@
static void *bg_gc_func(void *dummy)
while ((dev = yaffs_next_dev()) != NULL) {
result = yaffs_do_background_gc_reldev(dev, urgent);
- if (result > 0)
+
+ /* result is 1 if more than half the free space is
+ * erased.
+ * If less than half the free space is erased then it is
+ * worth doing another background_gc operation sooner.
+ */
+ if (result == 0)
next_urgent = 1;
}