From da0d94e481058c9b316dcb36c1335258a75ce382 Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Mon, 24 Mar 2025 10:18:11 +0100 Subject: [PATCH] vault backup: 2025-03-24 10:18:11 --- .../notes/7- MUTEX-free concurrency.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Concurrent Systems/notes/7- MUTEX-free concurrency.md b/Concurrent Systems/notes/7- MUTEX-free concurrency.md index 3e9414c..21ac560 100644 --- a/Concurrent Systems/notes/7- MUTEX-free concurrency.md +++ b/Concurrent Systems/notes/7- MUTEX-free concurrency.md @@ -167,12 +167,12 @@ conclude(i, v, s) := pop() := while true do - ⟨i,v,s⟩ <- TOP - conclude(i,v,s) - if i=k then - return FULL - newtop <- ⟨i+1,w,STACK[i+1].seq_num+1⟩ + ⟨i,v,s⟩ <- TOP + conclude(i,v,s) + if i=0 then + return EMPTY + newtop <- ⟨i-1,STACK[i-1⟩ if TOP.compare&set(⟨i,v,s⟩,newtop) then - return OK + return v ```