Pārlūkot izejas kodu

Document the configuration location caching

Clara Hobbs 7 gadus atpakaļ
vecāks
revīzija
9b79ee0791
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5
    0
      src/storage.h

+ 5
- 0
src/storage.h Parādīt failu

@@ -79,6 +79,11 @@ void pdb_config_flash_update(const struct pdb_config *cfg);
79 79
 /*
80 80
  * Get the first valid configuration strucure.  If the flash page is empty,
81 81
  * return NULL instead.
82
+ *
83
+ * The location of the configuration is cached, and the cache is updated when
84
+ * pdb_config_flash_erase and pdb_config_flash_update are called.  The full
85
+ * lookup is only performed the first time this function is called, so there's
86
+ * very little penalty to calling it repeatedly.
82 87
  */
83 88
 struct pdb_config *pdb_config_flash_read(void);
84 89
 

Notiek ielāde…
Atcelt
Saglabāt