MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / insert

Method insert

Kernel/include/hash.h:56–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 }
55
56 void insert(K key, T& value){
57 auto& bucket = buckets[hash(key) % bucketCount];
58
59 acquireLock(&lock);
60 bucket.add_back(KeyValuePair(key, value));
61 releaseLock(&lock);
62 }
63
64 T remove(K key){
65 auto& bucket = buckets[hash(key) % bucketCount];

Callers

nothing calls this directly

Calls 3

hashFunction · 0.85
KeyValuePairClass · 0.85
add_backMethod · 0.45

Tested by

no test coverage detected