Lines Matching refs:cache
54 struct cache { struct
60 struct cache cache; argument
64 static int check_cache(struct cache* cache) { in check_cache() argument
65 return cache->pinfo && __system_property_serial(cache->pinfo) != cache->serial; in check_cache()
71 static void refresh_cache(struct cache_char* cache, const char* key) { in refresh_cache() argument
74 if (!cache->cache.pinfo) { in refresh_cache()
75 cache->cache.pinfo = __system_property_find(key); in refresh_cache()
76 if (!cache->cache.pinfo) { in refresh_cache()
80 cache->cache.serial = __system_property_serial(cache->cache.pinfo); in refresh_cache()
81 __system_property_read(cache->cache.pinfo, 0, buf); in refresh_cache()
85 cache->c = strcasecmp(buf + 1, "rue") ? buf[0] : BOOLEAN_TRUE; in refresh_cache()
89 cache->c = strcasecmp(buf + 1, "alse") ? buf[0] : BOOLEAN_FALSE; in refresh_cache()
92 cache->c = buf[0]; in refresh_cache()
141 if (check_cache(&tag_cache[i].cache)) { in __android_log_level()
146 if (check_cache(&global_cache[i].cache)) { in __android_log_level()
165 tag_cache[i].cache.pinfo = NULL; in __android_log_level()
192 struct cache_char* cache = &tag_cache[i]; in __android_log_level() local
196 temp_cache.cache.pinfo = NULL; in __android_log_level()
198 cache = &temp_cache; in __android_log_level()
201 refresh_cache(cache, kp); in __android_log_level()
204 if (cache->c) { in __android_log_level()
205 c = cache->c; in __android_log_level()
230 struct cache_char* cache = &global_cache[i]; in __android_log_level() local
234 temp_cache = *cache; in __android_log_level()
235 if (temp_cache.cache.pinfo != cache->cache.pinfo) { /* check atomic */ in __android_log_level()
236 temp_cache.cache.pinfo = NULL; in __android_log_level()
239 cache = &temp_cache; in __android_log_level()
242 refresh_cache(cache, kp); in __android_log_level()
245 if (cache->c) { in __android_log_level()
246 c = cache->c; in __android_log_level()
330 change_detected = check_cache(&self->cache_persist.cache) || check_cache(&self->cache_ro.cache); in do_cache2_char()
374 struct cache cache; member
378 static void refresh_cache_property(struct cache_property* cache, const char* key) { in refresh_cache_property() argument
379 if (!cache->cache.pinfo) { in refresh_cache_property()
380 cache->cache.pinfo = __system_property_find(key); in refresh_cache_property()
381 if (!cache->cache.pinfo) { in refresh_cache_property()
385 cache->cache.serial = __system_property_serial(cache->cache.pinfo); in refresh_cache_property()
386 __system_property_read(cache->cache.pinfo, 0, cache->property); in refresh_cache_property()
413 change_detected = check_cache(&self->cache_persist.cache) || check_cache(&self->cache_ro.cache); in do_cache2_property_size()
430 static unsigned long property_get_size_from_cache(const struct cache_property* cache) { in property_get_size_from_cache() argument
432 unsigned long value = strtoul(cache->property, &cp, 10); in property_get_size_from_cache()