Skip to content

Commit

Permalink
use unsafe cas!
Browse files Browse the repository at this point in the history
  • Loading branch information
samth committed May 3, 2012
1 parent 8d364e2 commit 2f14a90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions by-hand/treiber-stack.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
(let retry ()
(define snapshot (unsafe-unbox* head))
(update-node node _x snapshot)
(unless (box-cas! head snapshot node)
(unless (unsafe-box*-cas! head snapshot node)
(retry)))))

(define (push s x)
Expand All @@ -44,7 +44,7 @@
(let retry ()
(define snapshot (unsafe-unbox* head))
(update-node node x snapshot)
(unless (box-cas! head snapshot node)
(unless (unsafe-box*-cas! head snapshot node)
(retry))))

(define (pop s
Expand Down

0 comments on commit 2f14a90

Please sign in to comment.