add cleanup rouines

This commit is contained in:
NIIBE Yutaka
2013-06-04 14:42:26 +09:00
parent ba594d5eae
commit 8056415dd2
6 changed files with 87 additions and 101 deletions

View File

@@ -66,9 +66,6 @@ const size_t __stacksize_blk = (size_t)&__process2_stack_size__;
int
main (int argc, const char *argv[])
{
chopstx_t thd;
chopstx_attr_t attr;
(void)argc;
(void)argv;
@@ -78,16 +75,8 @@ main (int argc, const char *argv[])
m = 10;
chopstx_attr_init (&attr);
chopstx_attr_setschedparam (&attr, PRIO_PWM);
chopstx_attr_setstack (&attr, __stackaddr_pwm, __stacksize_pwm);
chopstx_create (&thd, &attr, pwm, NULL);
chopstx_attr_setschedparam (&attr, PRIO_BLK);
chopstx_attr_setstack (&attr, __stackaddr_blk, __stacksize_blk);
chopstx_create (&thd, &attr, blk, NULL);
chopstx_create (PRIO_PWM, __stackaddr_pwm, __stacksize_pwm, pwm, NULL);
chopstx_create (PRIO_BLK, __stackaddr_blk, __stacksize_blk, blk, NULL);
chopstx_usec_wait (200*1000);