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
+2 -4
View File
@@ -64,12 +64,11 @@ infra_host_compfunc(void* key1, void* key2)
}
void
infra_host_delkeyfunc(void* k, void* ATTR_UNUSED(arg), int il)
infra_host_delkeyfunc(void* k, void* ATTR_UNUSED(arg))
{
struct infra_host_key* key = (struct infra_host_key*)k;
if(!key)
return;
if(il) { lock_rw_unlock(&key->entry.lock); }
lock_rw_destroy(&key->entry.lock);
free(key);
}
@@ -309,12 +308,11 @@ infra_lame_compfunc(void* key1, void* key2)
}
void
infra_lame_delkeyfunc(void* k, void* ATTR_UNUSED(arg), int il)
infra_lame_delkeyfunc(void* k, void* ATTR_UNUSED(arg))
{
struct infra_lame_key* key = (struct infra_lame_key*)k;
if(!key)
return;
if(il) { lock_rw_unlock(&key->entry.lock); }
lock_rw_destroy(&key->entry.lock);
free(key->zonename);
free(key);
+2 -2
View File
@@ -267,7 +267,7 @@ size_t infra_host_sizefunc(void* k, void* d);
int infra_host_compfunc(void* key1, void* key2);
/** delete key, and destroy the lock */
void infra_host_delkeyfunc(void* k, void* arg, int il);
void infra_host_delkeyfunc(void* k, void* arg);
/** delete data and destroy the lameness hashtable */
void infra_host_deldatafunc(void* d, void* arg);
@@ -280,7 +280,7 @@ size_t infra_lame_sizefunc(void* k, void* d);
int infra_lame_compfunc(void* key1, void* key2);
/** free key, lock and zonename */
void infra_lame_delkeyfunc(void* k, void* arg, int il);
void infra_lame_delkeyfunc(void* k, void* arg);
/** free the lameness data */
void infra_lame_deldatafunc(void* d, void* arg);
+1 -2
View File
@@ -47,8 +47,7 @@
#include "util/regional.h"
#include "util/alloc.h"
/** mark rrset to be deleted */
static void
void
rrset_markdel(void* key)
{
struct ub_packed_rrset_key* r = (struct ub_packed_rrset_key*)key;
+3
View File
@@ -207,4 +207,7 @@ void rrset_update_sec_status(struct rrset_cache* r,
void rrset_check_sec_status(struct rrset_cache* r,
struct ub_packed_rrset_key* rrset);
/** mark rrset to be deleted, set id=0 */
void rrset_markdel(void* key);
#endif /* SERVICES_CACHE_RRSET_H */