summaryrefslogtreecommitdiffstats
path: root/ipc/ipdl/test/ipdl/ok/race_DiamondRule1.ipdl
blob: cc1a8b16af241060df12f2a08cfbbf8a23d72c49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
protocol race_DiamondRule1 {

child:
    async Msg1();
    async Msg1_();
parent:
    async Msg2();
    async Msg2_();

    // OK: this state machine is one of the simplest that follows the
    // Diamond Rule

start state S1:
    send Msg1 goto S2;
    recv Msg2 goto S3;

state S2:
    recv Msg2 goto S4;
    recv Msg2_ goto S2;

state S3:
    send Msg1 goto S4;
    send Msg1_ goto S3;

state S4:
    send Msg1 goto S4;
};