MCPcopy Create free account
hub / github.com/F-Stack/f-stack / rw_cache_destroy

Function rw_cache_destroy

adapter/micro_thread/mt_cache.cpp:173–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173void rw_cache_destroy(TRWCache* cache)
174{
175 if ((cache == NULL) || (cache->pool == NULL)) {
176 return;
177 }
178
179 TSkBuffer* item = NULL;
180 TSkBuffer* tmp = NULL;
181 TAILQ_FOREACH_SAFE(item, &cache->list, entry, tmp)
182 {
183 TAILQ_REMOVE(&cache->list, item, entry);
184 free_sk_buffer(cache->pool, item);
185 }
186 cache->count = 0;
187 cache->len = 0;
188 cache->pool = NULL;
189}
190
191uint32_t cache_copy_out(TRWCache* cache, void* buff, uint32_t len)
192{

Callers 2

ResetMethod · 0.85
cache_append_dataFunction · 0.85

Calls 1

free_sk_bufferFunction · 0.85

Tested by

no test coverage detected