Skip to content

Commit 9441b9b

Browse files
author
Robbert van Renesse
committed
Allowing notifyAll for now
1 parent a612c82 commit 9441b9b

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

harmony_model_checker/modules/synch.hny

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ def notify(c):
6060
def notify_all(c):
6161
atomically !c = bags.empty()
6262

63+
# Deprecated
64+
def notifyAll(c):
65+
atomically !c = bags.empty()
66+
6367
def Semaphore(cnt) returns result:
6468
result = cnt
6569

harmony_model_checker/modules/synchBusy.hny

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ def notify(c):
2626
def notify_all(c):
2727
pass
2828

29+
# Deprecated
30+
def notifyAll(c):
31+
pass
32+
2933
def Semaphore(cnt):
3034
result = cnt
3135

harmony_model_checker/modules/synchImprecise.hny

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def notify(c):
3333
def notify_all(c):
3434
c->waiters = {}
3535

36+
# Deprecated
37+
def notifyAll(c):
38+
c->waiters = {}
39+
3640
def Semaphore(cnt):
3741
result = cnt
3842

harmony_model_checker/modules/synchS.hny

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,16 @@ def notify(c):
5454
atomically if !c != []:
5555
go ((!c)[0]) ()
5656
del (!c)[0]
57-
57+
5858
def notify_all(c):
5959
atomically:
6060
for ctx in !c:
6161
go ctx ()
6262
!c = []
63+
64+
# Deprecated
65+
def notifyAll(c):
66+
notify_all(c)
6367

6468
def Semaphore(cnt):
6569
result = { .count: cnt, .waiters: [] }

0 commit comments

Comments
 (0)