mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-02 12:08:11 +00:00
file_stream: solidify retry mechanism; df: multiline controls for text_cache-based info, begin porting over txti-based systems
This commit is contained in:
@@ -84,7 +84,7 @@ hs_submit_data(U128 key, Arena **data_arena, String8 data)
|
||||
HS_Stripe *stripe = &hs_shared->stripes[stripe_idx];
|
||||
|
||||
//- rjf: commit data to cache - if already there, just bump key refcount
|
||||
OS_MutexScopeW(stripe->rw_mutex)
|
||||
ProfScope("commit data to cache - if already there, just bump key refcount") OS_MutexScopeW(stripe->rw_mutex)
|
||||
{
|
||||
HS_Node *existing_node = 0;
|
||||
for(HS_Node *n = slot->first; n != 0; n = n->next)
|
||||
@@ -123,7 +123,7 @@ hs_submit_data(U128 key, Arena **data_arena, String8 data)
|
||||
|
||||
//- rjf: commit this hash to key cache
|
||||
U128 key_expired_hash = {0};
|
||||
OS_MutexScopeW(key_stripe->rw_mutex)
|
||||
ProfScope("commit this hash to key cache") OS_MutexScopeW(key_stripe->rw_mutex)
|
||||
{
|
||||
HS_KeyNode *key_node = 0;
|
||||
for(HS_KeyNode *n = key_slot->first; n != 0; n = n->next)
|
||||
@@ -152,7 +152,8 @@ hs_submit_data(U128 key, Arena **data_arena, String8 data)
|
||||
}
|
||||
|
||||
//- rjf: if this key's history cache was full, dec key ref count of oldest hash
|
||||
if(!u128_match(key_expired_hash, u128_zero()))
|
||||
ProfScope("if this key's history cache was full, dec key ref count of oldest hash")
|
||||
if(!u128_match(key_expired_hash, u128_zero()))
|
||||
{
|
||||
U64 old_hash_slot_idx = key_expired_hash.u64[1]%hs_shared->slots_count;
|
||||
U64 old_hash_stripe_idx = old_hash_slot_idx%hs_shared->stripes_count;
|
||||
|
||||
Reference in New Issue
Block a user