1.23
2.0
main
test-branch
| Line | |
|---|
| 1 | #include <civlc.h>
|
|---|
| 2 | int sh = 0;
|
|---|
| 3 |
|
|---|
| 4 | void Process(){
|
|---|
| 5 | double ** buf;
|
|---|
| 6 | int *p;
|
|---|
| 7 |
|
|---|
| 8 | p = (int *)$malloc($here, 2 * sizeof(int));
|
|---|
| 9 | buf = (double **)$malloc($here, 2 * sizeof(double *));
|
|---|
| 10 | for(int i=0; i<2; i++){
|
|---|
| 11 | buf[i] = (double *)$malloc($here,
|
|---|
| 12 | 2 * sizeof(double));
|
|---|
| 13 | }
|
|---|
| 14 |
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | /*void Process(){
|
|---|
| 18 | int *a[6];
|
|---|
| 19 | int b[6];
|
|---|
| 20 |
|
|---|
| 21 | for(int i = 0; i < 6; i++){
|
|---|
| 22 | b[i] = i;
|
|---|
| 23 | a[i] = &b[i];
|
|---|
| 24 | }
|
|---|
| 25 | for(int i = 0; i < 6; i++){
|
|---|
| 26 | sh ++;
|
|---|
| 27 | *a[i] = *a[i] + sh;
|
|---|
| 28 | }
|
|---|
| 29 | }*/
|
|---|
| 30 |
|
|---|
| 31 | void main(){
|
|---|
| 32 | $proc procs[2];
|
|---|
| 33 |
|
|---|
| 34 | procs[0] = $spawn Process();
|
|---|
| 35 | procs[1] = $spawn Process();
|
|---|
| 36 |
|
|---|
| 37 | $wait(procs[0]);
|
|---|
| 38 | $wait(procs[1]);
|
|---|
| 39 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.