test fiber

This commit is contained in:
zhengshuxin 2022-11-24 20:05:46 +08:00
parent 4a00da4e38
commit 7330aa00bb
2 changed files with 5 additions and 0 deletions

View File

@ -723,6 +723,9 @@ static ACL_FIBER *fiber_alloc(void (*fn)(ACL_FIBER *, void *),
__thread_fiber->idgen++;
}
printf(">>>>%s: fiber=%p, init_fn=%p, free_fn=%p, swap_fn=%p, start_fn=%p, fn=%p\n", __FUNCTION__,
fiber, fiber->init_fn, fiber->free_fn, fiber->swap_fn, fiber->start_fn, fiber->fn);
fiber->id = __thread_fiber->idgen;
fiber->errnum = 0;
fiber->signum = 0;

View File

@ -324,6 +324,8 @@ ACL_FIBER *fiber_unix_alloc(void (*start_fn)(ACL_FIBER *),
fb->fiber.swap_fn = (void (*)(ACL_FIBER*, ACL_FIBER*))fiber_unix_swap;
fb->fiber.start_fn = start_fn;
printf(">>>%s: fb=%p, init_fn=%p, free_fn=%p, swap_fn=%p, start_fn=%p\n",
__FUNCTION__, &fb->fiber, fb->fiber.init_fn, fb->fiber.free_fn, fb->fiber.swap_fn, fb->fiber.start_fn);
return (ACL_FIBER *) fb;
}