fptrwlist and remove oldhack with islocked param.

git-svn-id: file:///svn/unbound/trunk@805 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards
2007-12-04 21:34:53 +00:00
parent 2dbc83d5ae
commit f187e1da7e
17 changed files with 48 additions and 44 deletions
+1 -4
View File
@@ -543,12 +543,9 @@ msgreply_sizefunc(void* k, void* d)
}
void
query_entry_delete(void *k, void* ATTR_UNUSED(arg), int is_locked)
query_entry_delete(void *k, void* ATTR_UNUSED(arg))
{
struct msgreply_entry* q = (struct msgreply_entry*)k;
if(is_locked) {
lock_rw_unlock(&q->entry.lock);
}
lock_rw_destroy(&q->entry.lock);
query_info_clear(&q->key);
free(q);
+1 -1
View File
@@ -268,7 +268,7 @@ void query_info_clear(struct query_info* m);
size_t msgreply_sizefunc(void* k, void* d);
/** delete msgreply_entry key structure */
void query_entry_delete(void *q, void* arg, int is_locked);
void query_entry_delete(void *q, void* arg);
/** delete reply_info data structure */
void reply_info_delete(void* d, void* arg);
+1 -4
View File
@@ -121,14 +121,11 @@ ub_rrset_compare(void* k1, void* k2)
}
void
ub_rrset_key_delete(void* key, void* userdata, int is_locked)
ub_rrset_key_delete(void* key, void* userdata)
{
struct ub_packed_rrset_key* k = (struct ub_packed_rrset_key*)key;
struct alloc_cache* a = (struct alloc_cache*)userdata;
k->id = 0;
if(is_locked) {
lock_rw_unlock(&k->entry.lock);
}
free(k->rk.dname);
k->rk.dname = NULL;
alloc_special_release(a, k);
+3 -4
View File
@@ -300,13 +300,12 @@ int rrsetdata_equal(struct packed_rrset_data* d1, struct packed_rrset_data* d2);
/**
* Old key to be deleted. RRset keys are recycled via alloc.
* The id is set to 0. So that other threads, after acquiring a lock always
* get the correct value, in this case the 0 deleted-special value.
* @param key: struct ub_packed_rrset_key*.
* @param userdata: alloc structure to use for recycling.
* @param is_locked: if the key is locked, the id is set to 0 while it is
* still locked. So that other threads, after acquiring a lock always
* get the correct value, in this case the 0 deleted-special value.
*/
void ub_rrset_key_delete(void* key, void* userdata, int is_locked);
void ub_rrset_key_delete(void* key, void* userdata);
/**
* Old data to be deleted.