summaryrefslogtreecommitdiffstats
path: root/test/httpget.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/httpget.c')
-rw-r--r--test/httpget.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/test/httpget.c b/test/httpget.c
index fed6c06..9aec886 100644
--- a/test/httpget.c
+++ b/test/httpget.c
@@ -44,20 +44,16 @@ err:
ctx->hostname, bytes, -r, strerror(-r));
}
-static void init_fiber(void *ptr)
+int main(int argc, char **argv)
{
- struct tf_main_ctx *ctx = (struct tf_main_ctx *) ptr;
struct ctx *c;
int i;
- for (i = 1; i < ctx->argc; i++) {
- c = tf_fiber_create(ping_fiber, sizeof(struct ctx));
- c->hostname = ctx->argv[i];
+ tf_scheduler_enable(NULL);
+ for (i = 1; i < argc; i++) {
+ c = tf_fiber_create(NULL, ping_fiber, sizeof(struct ctx));
+ c->hostname = argv[i];
tf_fiber_put(c);
}
-}
-
-int main(int argc, char **argv)
-{
- return tf_main_args(init_fiber, argc, argv);
+ tf_scheduler_disable();
}