|
| 1 | +#include <stdio.h> |
| 2 | + |
| 3 | +module TestP { |
| 4 | + uses { |
| 5 | + interface Check as And00; |
| 6 | + interface Check as And01; |
| 7 | + interface Check as And10; |
| 8 | + interface Check as And11; |
| 9 | + interface Check as Or00; |
| 10 | + interface Check as Or01; |
| 11 | + interface Check as Or10; |
| 12 | + interface Check as Or11; |
| 13 | + } |
| 14 | +} implementation { |
| 15 | + int main() @C() @spontaneous() { |
| 16 | + call And00.check(); |
| 17 | + call And01.check(); |
| 18 | + call And10.check(); |
| 19 | + call And11.check(); |
| 20 | + call Or00.check(); |
| 21 | + call Or01.check(); |
| 22 | + call Or10.check(); |
| 23 | + call Or11.check(); |
| 24 | + } |
| 25 | + |
| 26 | + event void And00.checkDone(int result) { |
| 27 | + printf("And00.checkDone -> %d\n", result); |
| 28 | + } |
| 29 | + |
| 30 | + event void And01.checkDone(int result) { |
| 31 | + printf("And01.checkDone -> %d\n", result); |
| 32 | + } |
| 33 | + |
| 34 | + event void And10.checkDone(int result) { |
| 35 | + printf("And10.checkDone -> %d\n", result); |
| 36 | + } |
| 37 | + |
| 38 | + event void And11.checkDone(int result) { |
| 39 | + printf("And11.checkDone -> %d\n", result); |
| 40 | + } |
| 41 | + |
| 42 | + event void Or00.checkDone(int result) { |
| 43 | + printf("Or00.checkDone -> %d\n", result); |
| 44 | + } |
| 45 | + |
| 46 | + event void Or01.checkDone(int result) { |
| 47 | + printf("Or01.checkDone -> %d\n", result); |
| 48 | + } |
| 49 | + |
| 50 | + event void Or10.checkDone(int result) { |
| 51 | + printf("Or10.checkDone -> %d\n", result); |
| 52 | + } |
| 53 | + |
| 54 | + event void Or11.checkDone(int result) { |
| 55 | + printf("Or11.checkDone -> %d\n", result); |
| 56 | + } |
| 57 | +} |
0 commit comments