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