mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-02 03:47:53 +08:00
Rename id() to fiber_id() in fiber.hpp
This commit is contained in:
parent
e43f7e2410
commit
70e825f513
@ -94,7 +94,7 @@ public:
|
||||
* 获得指定协程对象的ID号
|
||||
* @return {unsigned int}
|
||||
*/
|
||||
static unsigned int id(const fiber& fb);
|
||||
static unsigned int fiber_id(const fiber& fb);
|
||||
|
||||
/**
|
||||
* 获得当前协程在执行某个系统 API 出错时的错误号
|
||||
|
@ -41,7 +41,7 @@ unsigned int fiber::self(void)
|
||||
return acl_fiber_self();
|
||||
}
|
||||
|
||||
unsigned int fiber::id(const fiber& fb)
|
||||
unsigned int fiber::fiber_id(const fiber& fb)
|
||||
{
|
||||
ACL_FIBER *f = fb.get_fiber();
|
||||
return f ? acl_fiber_id(f) : 0;
|
||||
|
@ -68,7 +68,7 @@ private:
|
||||
}
|
||||
|
||||
void show(const acl::fiber_mutex_stat& stat) {
|
||||
printf("fiber-%d:\r\n", acl::fiber::id(*stat.fb));
|
||||
printf("fiber-%d:\r\n", acl::fiber::fiber_id(*stat.fb));
|
||||
|
||||
std::vector<acl::fiber_frame> stack;
|
||||
acl::fiber::stacktrace(*stat.fb, stack, 50);
|
||||
|
Loading…
Reference in New Issue
Block a user