switch to stripe-cv-based waiting mechanism on nonzero scope touches

This commit is contained in:
Ryan Fleury
2025-05-18 12:58:44 -07:00
parent f99dd2a477
commit 0a51de094d
3 changed files with 13 additions and 16 deletions
+2 -4
View File
@@ -1434,10 +1434,8 @@ ctrl_scope_close(CTRL_Scope *scope)
for(CTRL_ScopeCallStackTouch *t = scope->first_call_stack_touch, *next = 0; t != 0; t = next)
{
next = t->next;
if(!ins_atomic_u64_dec_eval(&t->node->scope_touch_count))
{
os_condition_variable_broadcast(t->stripe->cv);
}
ins_atomic_u64_dec_eval(&t->node->scope_touch_count);
os_condition_variable_broadcast(t->stripe->cv);
SLLStackPush(ctrl_tctx->free_call_stack_touch, t);
}
SLLStackPush(ctrl_tctx->free_scope, scope);