diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-10-17 22:36:29 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-10-17 22:36:29 -0700 |
commit | 09db6ed0371720683debe1fecbe3be77e9555c9d (patch) | |
tree | ca32e0b5e5f9f9b74c97873b3ca43a5ff8ff3b41 | |
parent | c1207675830fd3bba7e53d33acba478fb5183d37 (diff) | |
download | mu-09db6ed0371720683debe1fecbe3be77e9555c9d.tar.gz |
3513
-rw-r--r-- | 073wait.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/073wait.cc b/073wait.cc index bdc5a881..26fb07a0 100644 --- a/073wait.cc +++ b/073wait.cc @@ -62,6 +62,15 @@ void dump_waiting_routines() { } } +:(scenario wait_for_location_can_deadlock) +% Hide_errors = true; +def main [ + 10:num <- copy 1 + 20:location <- copy 10/unsafe + wait-for-reset-then-set 20:location +] ++error: deadlock! + //: Primitive recipe to put routines in that state. //: This primitive is also known elsewhere as compare-and-set (CAS). Used to //: build locks. |