summaryrefslogtreecommitdiffstats
path: root/test/simple1.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/simple1.c')
-rw-r--r--test/simple1.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/simple1.c b/test/simple1.c
index 6f40f8d..b6de289 100644
--- a/test/simple1.c
+++ b/test/simple1.c
@@ -10,7 +10,7 @@ static void work_fiber(void *ptr)
struct ctx *c = (struct ctx*) ptr;
printf("Hello%d.1\n", c->id);
- tf_fiber_yield();
+ tf_msleep(1);
printf("Hello%d.2\n", c->id);
}
@@ -19,11 +19,11 @@ int main(int argc, char **argv)
struct ctx *c;
int i;
- tf_scheduler_enable(NULL);
+ tf_vmach_start();
for (i = 0; i < 6; i++) {
c = tf_fiber_create(work_fiber, sizeof(struct ctx));
c->id = i;
- tf_fiber_put(c);
+ tf_fiber_run(c);
}
- tf_scheduler_disable();
+ tf_vmach_stop();
}