__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2024 Google LLC
*/
#include "gendwarfksyms.h"
struct cache_item {
unsigned long key;
int value;
struct hlist_node hash;
};
void cache_set(struct cache *cache, unsigned long key, int value)
{
struct cache_item *ci;
ci = xmalloc(sizeof(struct cache_item));
ci->key = key;
ci->value = value;
hash_add(cache->cache, &ci->hash, hash_32(key));
}
int cache_get(struct cache *cache, unsigned long key)
{
struct cache_item *ci;
hash_for_each_possible(cache->cache, ci, hash, hash_32(key)) {
if (ci->key == key)
return ci->value;
}
return -1;
}
void cache_init(struct cache *cache)
{
hash_init(cache->cache);
}
void cache_free(struct cache *cache)
{
struct hlist_node *tmp;
struct cache_item *ci;
hash_for_each_safe(cache->cache, ci, tmp, hash) {
free(ci);
}
hash_init(cache->cache);
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| examples | Folder | 0755 |
|
|
| .gitignore | File | 50 B | 0644 |
|
| Makefile | File | 333 B | 0644 |
|
| cache.c | File | 869 B | 0644 |
|
| die.c | File | 3.06 KB | 0644 |
|
| dwarf.c | File | 28.57 KB | 0644 |
|
| gendwarfksyms.c | File | 4.06 KB | 0644 |
|
| gendwarfksyms.h | File | 7.06 KB | 0644 |
|
| kabi.c | File | 7.04 KB | 0644 |
|
| symbols.c | File | 7.63 KB | 0644 |
|
| types.c | File | 10.43 KB | 0644 |
|