sync/gen_actions.ysl2
branchsync
changeset 2902 5692b0768f9e
parent 2844 6fce34991f7d
child 2903 33549a7c7191
     1.1 --- a/sync/gen_actions.ysl2	Wed Aug 29 20:38:40 2018 +0200
     1.2 +++ b/sync/gen_actions.ysl2	Wed Aug 29 21:40:59 2018 +0200
     1.3 @@ -35,6 +35,22 @@
     1.4              #include "«@name»_impl.h"
     1.5              `` for "fsm" | #include "«@name»_fsm.h"
     1.6  
     1.7 +            static bool _TID_greater(TID_t *t1, TID_t *t2)
     1.8 +            {
     1.9 +                if (t1->size > t2->size)
    1.10 +                    return true;
    1.11 +
    1.12 +                if (t2->size > t1->size)
    1.13 +                    return false;
    1.14 +
    1.15 +                for (int i=0; i<t1->size; i++) {
    1.16 +                    if (t1->buf[i] > t2->buf[i])
    1.17 +                        return true;
    1.18 +                }
    1.19 +
    1.20 +                return false;
    1.21 +            }
    1.22 +
    1.23              ||
    1.24              apply "func:distinctName(//condition)", 0;
    1.25              apply "func:distinctName(//action[not(starts-with(@name, 'send'))])", 0;