Lines Matching refs:key_pointer
52 void Pointers::Add(uintptr_t key_pointer, void* pointer) {
53 pointer_data* data = FindEmpty(key_pointer);
55 err(1, "No empty entry found for 0x%" PRIxPTR "\n", key_pointer);
57 atomic_store(&data->key_pointer, key_pointer);
61 void* Pointers::Remove(uintptr_t key_pointer) {
62 if (key_pointer == 0) {
66 pointer_data* data = Find(key_pointer);
68 err(1, "No pointer value found for 0x%" PRIxPTR "\n", key_pointer);
72 atomic_store(&data->key_pointer, uintptr_t(0));
77 pointer_data* Pointers::Find(uintptr_t key_pointer) {
78 size_t index = GetHash(key_pointer);
80 if (atomic_load(&pointers_[index].key_pointer) == key_pointer) {
90 pointer_data* Pointers::FindEmpty(uintptr_t key_pointer) {
91 size_t index = GetHash(key_pointer);
94 if (atomic_compare_exchange_strong(&pointers_[index].key_pointer, &empty,
105 size_t Pointers::GetHash(uintptr_t key_pointer) {
106 return key_pointer % max_pointers_;
111 if (atomic_load(&pointers_[i].key_pointer) != 0) {