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