mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-02 11:57:43 +08:00
test fiber
This commit is contained in:
parent
4a00da4e38
commit
7330aa00bb
@ -723,6 +723,9 @@ static ACL_FIBER *fiber_alloc(void (*fn)(ACL_FIBER *, void *),
|
|||||||
__thread_fiber->idgen++;
|
__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->id = __thread_fiber->idgen;
|
||||||
fiber->errnum = 0;
|
fiber->errnum = 0;
|
||||||
fiber->signum = 0;
|
fiber->signum = 0;
|
||||||
|
@ -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.swap_fn = (void (*)(ACL_FIBER*, ACL_FIBER*))fiber_unix_swap;
|
||||||
fb->fiber.start_fn = start_fn;
|
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;
|
return (ACL_FIBER *) fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user