Lines Matching refs:entry
16 #define LOG_CACHE_DBG_ENTRY(str, entry) \ argument
17 printk(str " entry(%p) id %p\n", entry, (void *)entry->id)
32 struct log_cache_entry *entry = config->buf; in log_cache_init() local
41 sys_slist_append(&cache->idle, &entry->node); in log_cache_init()
42 entry = (struct log_cache_entry *)((uintptr_t)entry + entry_size); in log_cache_init()
56 struct log_cache_entry *entry; in log_cache_get() local
60 SYS_SLIST_FOR_EACH_CONTAINER(&cache->active, entry, node) { in log_cache_get()
61 LOG_CACHE_DBG_ENTRY("checking", entry); in log_cache_get()
62 if (cache->cmp(entry->id, id)) { in log_cache_get()
68 if (&entry->node == sys_slist_peek_tail(&cache->active)) { in log_cache_get()
71 prev_node = &entry->node; in log_cache_get()
75 LOG_CACHE_DBG_ENTRY("moving up", entry); in log_cache_get()
76 sys_slist_remove(&cache->active, prev_node, &entry->node); in log_cache_get()
77 sys_slist_prepend(&cache->active, &entry->node); in log_cache_get()
84 entry = CONTAINER_OF(from_idle, struct log_cache_entry, node); in log_cache_get()
86 LOG_CACHE_DBG_ENTRY("removing", entry); in log_cache_get()
87 sys_slist_remove(&cache->active, prev_node, &entry->node); in log_cache_get()
91 *data = entry->data; in log_cache_get()
92 entry->id = id; in log_cache_get()
99 struct log_cache_entry *entry = CONTAINER_OF(data, struct log_cache_entry, data[0]); in log_cache_put() local
101 LOG_CACHE_DBG_ENTRY("cache_put", entry); in log_cache_put()
102 sys_slist_prepend(&cache->active, &entry->node); in log_cache_put()
107 struct log_cache_entry *entry = CONTAINER_OF(data, struct log_cache_entry, data[0]); in log_cache_release() local
109 LOG_CACHE_DBG_ENTRY("cache_release", entry); in log_cache_release()
110 sys_slist_prepend(&cache->idle, &entry->node); in log_cache_release()