From 5b00aaadafbe9a94c3a0967ba25ecf1cce692c14 Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Tue, 30 Sep 2025 14:18:11 -0700 Subject: [PATCH] debugging / fixes --- src/artifact_cache/artifact_cache.c | 10 +++++++--- src/dbg_info/dbg_info2.c | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/artifact_cache/artifact_cache.c b/src/artifact_cache/artifact_cache.c index 2993b3be..6733f213 100644 --- a/src/artifact_cache/artifact_cache.c +++ b/src/artifact_cache/artifact_cache.c @@ -340,13 +340,17 @@ ac_async_tick(void) AC_Request *r = &task->wide[idx]; // rjf: any new higher priority tasks? -> cancel - if(task_idx == 1 && idx != 0) MutexScope(ac_shared->req_batches[0].mutex) + if(lane_idx() == 0) { - if(ac_shared->req_batches[0].wide_count != 0 || ac_shared->req_batches[0].thin_count != 0) + if(task_idx == 1 && idx != 0) MutexScope(ac_shared->req_batches[0].mutex) { - ins_atomic_u64_eval_assign(cancelled_ptr, 1); + if(ac_shared->req_batches[0].wide_count != 0 || ac_shared->req_batches[0].thin_count != 0) + { + ins_atomic_u64_eval_assign(cancelled_ptr, 1); + } } } + lane_sync(); // rjf: cancelled? -> exit if(ins_atomic_u64_eval(cancelled_ptr)) diff --git a/src/dbg_info/dbg_info2.c b/src/dbg_info/dbg_info2.c index 7ada292f..84c1e75a 100644 --- a/src/dbg_info/dbg_info2.c +++ b/src/dbg_info/dbg_info2.c @@ -1401,6 +1401,7 @@ di2_match_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out) artifact.u64[3] = match.idx; } + lane_sync(); scratch_end(scratch); return artifact; }