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

Function cache_skip_first_buffer

adapter/micro_thread/mt_cache.cpp:260–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260TSkBuffer* cache_skip_first_buffer(TRWCache* cache)
261{
262 TSkBuffer* buff = TAILQ_FIRST(&cache->list);
263 if ((NULL == cache) || (NULL == buff))
264 {
265 return NULL;
266 }
267
268 TAILQ_REMOVE(&cache->list, buff, entry);
269 if (cache->len >= buff->data_len)
270 {
271 cache->len -= buff->data_len;
272 }
273
274 if (cache->count > 0)
275 {
276 cache->count--;
277 }
278
279 return buff;
280}
281
282int32_t cache_append_data(TRWCache* cache, const void* data, uint32_t len)
283{

Callers 1

DispathUdpMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected