main
test-branch
| Line | |
|---|
| 1 | /* Deadlocking use of communicator. Commandline execution:
|
|---|
| 2 | * civl verify commBad.cvl
|
|---|
| 3 | * */
|
|---|
| 4 | #include <civlc.cvh>
|
|---|
| 5 | #include <comm.cvh>
|
|---|
| 6 | #define TAG 0
|
|---|
| 7 | $scope root = $here;
|
|---|
| 8 | $gcomm gcomm = $gcomm_create(root, 2);
|
|---|
| 9 | _Bool start = $false;
|
|---|
| 10 |
|
|---|
| 11 | void worker(int me) {
|
|---|
| 12 | $comm comm = $comm_create($here, gcomm, me);
|
|---|
| 13 | $when (start);
|
|---|
| 14 | $comm_dequeue(comm, me, TAG);
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | void main() {
|
|---|
| 18 | $proc worker_proc = $spawn worker(0);
|
|---|
| 19 |
|
|---|
| 20 | start = $true;
|
|---|
| 21 | $wait(worker_proc);
|
|---|
| 22 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.