Lines Matching refs:ref
175 rrset_update_id(struct rrset_ref* ref, struct alloc_cache* alloc) in rrset_update_id() argument
180 lock_rw_wrlock(&ref->key->entry.lock); in rrset_update_id()
182 if(ref->key->id == ref->id) { in rrset_update_id()
183 ref->key->id = newid; in rrset_update_id()
184 ref->id = newid; in rrset_update_id()
186 lock_rw_unlock(&ref->key->entry.lock); in rrset_update_id()
190 rrset_cache_update(struct rrset_cache* r, struct rrset_ref* ref, in rrset_cache_update() argument
194 struct ub_packed_rrset_key* k = ref->key; in rrset_cache_update()
198 log_assert(ref->id != 0 && k->id != 0); in rrset_cache_update()
209 ref->key = (struct ub_packed_rrset_key*)e->key; in rrset_cache_update()
210 ref->id = ref->key->id; in rrset_cache_update()
230 log_assert(ref->key->id != 0); in rrset_cache_update()
239 rrset_update_id(ref, alloc); in rrset_cache_update()
250 struct rrset_ref ref; in rrset_cache_update_wildcard() local
273 ref.key = rrset; in rrset_cache_update_wildcard()
274 ref.id = rrset->id; in rrset_cache_update_wildcard()
276 (void)rrset_cache_update(rrset_cache, &ref, alloc, timenow); in rrset_cache_update_wildcard()
312 rrset_array_lock(struct rrset_ref* ref, size_t count, time_t timenow) in rrset_array_lock() argument
316 if(i>0 && ref[i].key == ref[i-1].key) in rrset_array_lock()
318 lock_rw_rdlock(&ref[i].key->entry.lock); in rrset_array_lock()
319 if(ref[i].id != ref[i].key->id || timenow > in rrset_array_lock()
320 ((struct packed_rrset_data*)(ref[i].key->entry.data)) in rrset_array_lock()
323 rrset_array_unlock(ref, i+1); in rrset_array_lock()
331 rrset_array_unlock(struct rrset_ref* ref, size_t count) in rrset_array_unlock() argument
335 if(i>0 && ref[i].key == ref[i-1].key) in rrset_array_unlock()
337 lock_rw_unlock(&ref[i].key->entry.lock); in rrset_array_unlock()
343 struct rrset_ref* ref, size_t count) in rrset_array_unlock_touch() argument
353 h[i] = ref[i].key->entry.hash; in rrset_array_unlock_touch()
356 if(i>0 && ref[i].key == ref[i-1].key) in rrset_array_unlock_touch()
358 lock_rw_unlock(&ref[i].key->entry.lock); in rrset_array_unlock_touch()
363 if(i>0 && ref[i].key == ref[i-1].key) in rrset_array_unlock_touch()
365 rrset_cache_touch(r, ref[i].key, h[i], ref[i].id); in rrset_array_unlock_touch()