mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-08-30 03:39:44 +02:00
LRU touch of RRsets. Pretty complicated to do.
git-svn-id: file:///svn/unbound/trunk@324 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -139,6 +139,9 @@ read_header(FILE* in)
|
||||
the_time = t;
|
||||
the_pid = p;
|
||||
memset(threads, 0, 256*sizeof(int));
|
||||
if(thrno >= 256) {
|
||||
fatal_exit("Thread number too big. %d", thrno);
|
||||
}
|
||||
threads[thrno] = 1;
|
||||
have_values = 1;
|
||||
printf(" trace %d from pid %u on %s", thrno,
|
||||
@@ -332,7 +335,7 @@ static void search_cycle(struct lock_ref* visit, int level,
|
||||
/* check for cycle */
|
||||
if(detect_cycle(visit, from) && level != 0) {
|
||||
found_cycle(visit, level);
|
||||
return;
|
||||
fatal_exit("found lock order cycle");
|
||||
}
|
||||
/* recurse */
|
||||
if(!visit->lock->visited)
|
||||
|
||||
@@ -62,7 +62,7 @@ static size_t test_sizefunc(void*, void*);
|
||||
/** comparefunc for lruhash */
|
||||
static int test_compfunc(void*, void*);
|
||||
/** delkey for lruhash */
|
||||
static void test_delkey(void*, void*);
|
||||
static void test_delkey(void*, void*, int);
|
||||
/** deldata for lruhash */
|
||||
static void test_deldata(void*, void*);
|
||||
/* --- end test representation --- */
|
||||
@@ -524,8 +524,9 @@ static int test_compfunc(void* key1, void* key2)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void test_delkey(void* key, void* ATTR_UNUSED(arg))
|
||||
static void test_delkey(void* key, void* ATTR_UNUSED(arg), int l)
|
||||
{
|
||||
if(l) lock_rw_unlock(&((struct testkey*)key)->entry.lock);
|
||||
delkey((struct testkey*)key);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ static size_t test_sizefunc(void*, void*);
|
||||
/** comparefunc for lruhash */
|
||||
static int test_compfunc(void*, void*);
|
||||
/** delkey for lruhash */
|
||||
static void test_delkey(void*, void*);
|
||||
static void test_delkey(void*, void*, int);
|
||||
/** deldata for lruhash */
|
||||
static void test_deldata(void*, void*);
|
||||
/* --- end test representation --- */
|
||||
@@ -404,8 +404,9 @@ static int test_compfunc(void* key1, void* key2)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void test_delkey(void* key, void* ATTR_UNUSED(arg))
|
||||
static void test_delkey(void* key, void* ATTR_UNUSED(arg), int l)
|
||||
{
|
||||
if(l) lock_rw_unlock(&((struct slabtestkey*)key)->entry.lock);
|
||||
delkey((struct slabtestkey*)key);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user