Skip to content

Commit

Permalink
minor edit to ticket-lock
Browse files Browse the repository at this point in the history
  • Loading branch information
EkanshdeepGupta committed Nov 3, 2024
1 parent f3154c9 commit 1c66826
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/concurrent/lock/ticket-lock.rav
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module TicketLock[R: LockResource]
IntSet.set({||})
)
)
)
)
}

proc create(r: R)
Expand Down Expand Up @@ -100,11 +100,11 @@ module TicketLock[R: LockResource]

var crr: Int := l.curr;

if (x != crr) {
fold lock_inv(l, r)[ b := b1];
} else {
if (x == crr) {
fold lock_inv(l, r)[ b := true];
acq_flag := true;
} else {
fold lock_inv(l, r)[ b := b1];
}
}

Expand Down

0 comments on commit 1c66826

Please sign in to comment.