projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "ticketlock model: state-space simplication"
[urcu.git]
/
ticketlock
/
mem-progress.spin
diff --git
a/ticketlock/mem-progress.spin
b/ticketlock/mem-progress.spin
index b7395413dea110b4006e50313168579b9eebcbea..dad43a45062a90e307b9b00c44d0eafe66bc49d3 100644
(file)
--- a/
ticketlock/mem-progress.spin
+++ b/
ticketlock/mem-progress.spin
@@
-45,8
+45,15
@@
inline spin_lock(lock, ticket)
lock = lock + HIGH_HALF_INC; /* overflow expected */
}
lock = lock + HIGH_HALF_INC; /* overflow expected */
}
- /* busy-wait */
- LOW_HALF(lock) == ticket -> 1;
+ do
+ :: 1 ->
+ if
+ :: (LOW_HALF(lock) == ticket) ->
+ break;
+ :: else ->
+ skip;
+ fi;
+ od;
}
inline spin_unlock(lock)
}
inline spin_unlock(lock)
@@
-59,9
+66,9
@@
proctype proc_A()
byte ticket;
do
byte ticket;
do
- ::
- spin_lock(lock, ticket);
+ :: 1 ->
progress_A:
progress_A:
+ spin_lock(lock, ticket);
refcount = refcount + 1;
refcount = refcount - 1;
spin_unlock(lock);
refcount = refcount + 1;
refcount = refcount - 1;
spin_unlock(lock);
@@
-73,7
+80,8
@@
proctype proc_B()
byte ticket;
do
byte ticket;
do
- :: spin_lock(lock, ticket);
+ :: 1 ->
+ spin_lock(lock, ticket);
refcount = refcount + 1;
refcount = refcount - 1;
spin_unlock(lock);
refcount = refcount + 1;
refcount = refcount - 1;
spin_unlock(lock);
This page took
0.023036 seconds
and
4
git commands to generate.