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

Method get

Kernel/include/hash.h:80–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 }
79
80 T get(K key){
81 auto& bucket = buckets[hash(key) % bucketCount];
82
83 acquireLock(&lock);
84 for(KeyValuePair& val : bucket){
85 if(val.key == key){
86 releaseLock(&lock);
87 return val.value;
88 }
89 }
90 releaseLock(&lock);
91
92 return T();
93 }
94
95 ~HashMap(){
96 delete[](buckets);

Callers 15

mainFunction · 0.45
FindHandleFunction · 0.45
SysFutexWakeFunction · 0.45
SysFutexWaitFunction · 0.45
SysCreateInterfaceFunction · 0.45
SysInterfaceAcceptFunction · 0.45
SysInterfaceConnectFunction · 0.45
SysEndpointQueueFunction · 0.45
SysEndpointDequeueFunction · 0.45
SysEndpointCallFunction · 0.45
SysEndpointInfoFunction · 0.45
DestroyMethod · 0.45

Calls 1

hashFunction · 0.85

Tested by

no test coverage detected