From 16ba60f128f6a099f4d47291e570019a7c897f00 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 14 Feb 2024 11:16:17 -0500 Subject: bftw: Document which bftw_file nodes go with which lists --- src/bftw.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/bftw.c b/src/bftw.c index 664651c..6f52299 100644 --- a/src/bftw.c +++ b/src/bftw.c @@ -196,12 +196,26 @@ struct bftw_file { /** The root under which this file was found. */ struct bftw_file *root; - /** The next file to open/close/visit. */ + /** + * List node for: + * + * bftw_queue::buffer + * bftw_queue::waiting + * bftw_file_open()::parents + */ struct bftw_file *next; - /** The next directory to read. */ + + /** + * List node for: + * + * bftw_queue::ready + * bftw_state::to_close + */ struct { struct bftw_file *next; } ready; - /** LRU list node. */ + /** + * List node for bftw_cache. + */ struct { struct bftw_file *prev; struct bftw_file *next; -- cgit v1.2.3