acl  3.5.3.0
fiber_cond.h 文件参考
#include "fiber_define.h"
#include "fiber_event.h"
+ fiber_cond.h 的引用(Include)关系图:
+ 此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

类型定义

typedef struct ACL_FIBER_COND ACL_FIBER_COND
 

函数

FIBER_API ACL_FIBER_CONDacl_fiber_cond_create (unsigned flag)
 
FIBER_API void acl_fiber_cond_free (ACL_FIBER_COND *cond)
 
FIBER_API int acl_fiber_cond_wait (ACL_FIBER_COND *cond, ACL_FIBER_EVENT *event)
 
FIBER_API int acl_fiber_cond_timedwait (ACL_FIBER_COND *cond, ACL_FIBER_EVENT *event, int delay_ms)
 
FIBER_API int acl_fiber_cond_signal (ACL_FIBER_COND *cond)
 

类型定义说明

◆ ACL_FIBER_COND

fiber_cond object look like pthread_cond_t which is used between threads and fibers

在文件 fiber_cond.h17 行定义.

函数说明

◆ acl_fiber_cond_create()

FIBER_API ACL_FIBER_COND* acl_fiber_cond_create ( unsigned  flag)

create fiber cond which can be used in fibers more or threads mode

参数
flag{unsigned} current not used, just for the future extend
返回
{ACL_FIBER_COND *}

◆ acl_fiber_cond_free()

FIBER_API void acl_fiber_cond_free ( ACL_FIBER_COND cond)

free cond created by acl_fiber_cond_create

参数
cond{ACL_FIBER_COND *}

◆ acl_fiber_cond_signal()

FIBER_API int acl_fiber_cond_signal ( ACL_FIBER_COND cond)

signle the cond which will wakeup one waiter for the cond to be signaled

参数
cond{ACL_FIBER_COND *}
返回
{int} return 0 if ok or return error value

◆ acl_fiber_cond_timedwait()

FIBER_API int acl_fiber_cond_timedwait ( ACL_FIBER_COND cond,
ACL_FIBER_EVENT event,
int  delay_ms 
)

wait for cond event to be signaled with the specified timeout

参数
cond{ACL_FIBER_COND *}
返回
{int} return 0 if ok or return error value, when timedout ETIMEDOUT will be returned

◆ acl_fiber_cond_wait()

FIBER_API int acl_fiber_cond_wait ( ACL_FIBER_COND cond,
ACL_FIBER_EVENT event 
)

wait for cond event to be signaled

参数
cond{ACL_FIBER_COND *}
event{ACL_FIBER_EVENT *} must be owned by the current caller
返回
{int} return 0 if ok or return error value