comparison temporal_logic/hoge.cbc @ 10:972515f10c1d draft

add some files
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Sun, 03 Jun 2012 22:09:13 +0900
parents
children
comparison
equal deleted inserted replaced
9:18d2a590bc10 10:972515f10c1d
1 #include <stdio.h>
2 #include "hoge.h"
3 #include "task.h"
4
5 code increment(PktPtr pkt, TaskPtr current_task)
6 {
7 pkt->val++;
8 printf("inc: %d\n", pkt->val);
9 pkt->next = modulo;
10 goto scheduler(pkt, current_task);
11 }
12
13 code modulo(PktPtr pkt, TaskPtr current_task)
14 {
15 // pkt->val %= 10;
16 pkt->val = pkt->val % 10;
17 printf("mod: %d\n", pkt->val);
18 pkt->next = increment;
19 goto scheduler(pkt, current_task);
20 }