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

浏览源代码.

类型定义

typedef struct ACL_CHANNEL ACL_CHANNEL
 

函数

FIBER_API ACL_CHANNELacl_channel_create (int elemsize, int bufsize)
 
FIBER_API void acl_channel_free (ACL_CHANNEL *c)
 
FIBER_API int acl_channel_send (ACL_CHANNEL *c, void *v)
 
FIBER_API int acl_channel_send_nb (ACL_CHANNEL *c, void *v)
 
FIBER_API int acl_channel_recv (ACL_CHANNEL *c, void *v)
 
FIBER_API int acl_channel_recv_nb (ACL_CHANNEL *c, void *v)
 
FIBER_API int acl_channel_sendp (ACL_CHANNEL *c, void *v)
 
FIBER_API void * acl_channel_recvp (ACL_CHANNEL *c)
 
FIBER_API int acl_channel_sendp_nb (ACL_CHANNEL *c, void *v)
 
FIBER_API void * acl_channel_recvp_nb (ACL_CHANNEL *c)
 
FIBER_API int acl_channel_sendul (ACL_CHANNEL *c, unsigned long val)
 
FIBER_API unsigned long acl_channel_recvul (ACL_CHANNEL *c)
 
FIBER_API int acl_channel_sendul_nb (ACL_CHANNEL *c, unsigned long val)
 
FIBER_API unsigned long acl_channel_recvul_nb (ACL_CHANNEL *c)
 

类型定义说明

◆ ACL_CHANNEL

typedef struct ACL_CHANNEL ACL_CHANNEL

the fiber channel type definition

在文件 fiber_channel.h15 行定义.

函数说明

◆ acl_channel_create()

FIBER_API ACL_CHANNEL* acl_channel_create ( int  elemsize,
int  bufsize 
)

create one fiber channel

参数
elemsize{int} the fixed object size transfered in fiber channel
bufsize{int} the buffered of objects in fiber channel
返回
{ACL_CHANNNEL*}

◆ acl_channel_free()

FIBER_API void acl_channel_free ( ACL_CHANNEL c)

free fiber channel created by acl_channel_create

参数
c{ACL_CHANNEL*} created by acl_channel_create

◆ acl_channel_recv()

FIBER_API int acl_channel_recv ( ACL_CHANNEL c,
void *  v 
)

read one object from specified channel in block mode

参数
c{ACL_CHANNEL*} created by acl_channel_create
v{void*} will store the result
返回
{int} value(>= 0) returned if get one object

◆ acl_channel_recv_nb()

FIBER_API int acl_channel_recv_nb ( ACL_CHANNEL c,
void *  v 
)

read one object from specified channel in non-block ode

参数
c{ACL_CHANNEL*} created by acl_channel_create
v{void*} will store the result
返回
{int} value(>= 0) returned if get one object, or NULL returned if none object been got

◆ acl_channel_recvp()

FIBER_API void* acl_channel_recvp ( ACL_CHANNEL c)

get object's addr from specified channel in block mode

参数
c{ACL_CHANNEL*} created by acl_channel_create
返回
{void*} non-NULL addr returned

◆ acl_channel_recvp_nb()

FIBER_API void* acl_channel_recvp_nb ( ACL_CHANNEL c)

get the object's addr form specified channel in non-block mode

参数
c{ACL_CHANNEL*} created by acl_channel_create
返回
{void*} * non-NULL returned when got one, or NULL returned

◆ acl_channel_recvul()

FIBER_API unsigned long acl_channel_recvul ( ACL_CHANNEL c)

get unsigned integer from specified channel in block mode

参数
c{ACL_CHANNEL*} created by acl_channel_create
返回
{unsigned long}

◆ acl_channel_recvul_nb()

FIBER_API unsigned long acl_channel_recvul_nb ( ACL_CHANNEL c)

get one unsigned integer from specified channel in non-block mode

参数
c{ACL_CHANNEL*} created by acl_channel_create
返回
{unsigned long}

◆ acl_channel_send()

FIBER_API int acl_channel_send ( ACL_CHANNEL c,
void *  v 
)

send object to specified fiber channel in block mode

参数
c{ACL_CHANNEL*} created by acl_channel_create
v{void*} the object to be transfered
返回
{int} value (>= 0) returned

◆ acl_channel_send_nb()

FIBER_API int acl_channel_send_nb ( ACL_CHANNEL c,
void *  v 
)

send object to specified fiber channel in non-block mode, one new object copied from which will be created internal

参数
c{ACL_CHANNEL*} created by acl_channel_create
v{void*} the object to be transfered
返回
{int} value (>= 0) returned

◆ acl_channel_sendp()

FIBER_API int acl_channel_sendp ( ACL_CHANNEL c,
void *  v 
)

send object's addr to specified channel in block mode

参数
c{ACL_CHANNEL*} created by acl_channel_create
v{void*} the addr of the object to be transfered
返回
{int} value (>= 0) returned

◆ acl_channel_sendp_nb()

FIBER_API int acl_channel_sendp_nb ( ACL_CHANNEL c,
void *  v 
)

send the object's addr to specified channel in non-block mode

参数
c{ACL_CHANNEL*} created by acl_channel_create
v{void*} the addr of the object to be transfered
返回
{int} value which is >= 0 returned

◆ acl_channel_sendul()

FIBER_API int acl_channel_sendul ( ACL_CHANNEL c,
unsigned long  val 
)

send unsigned integer to specified channel in block mode

参数
c{ACL_CHANNEL*} created by acl_channel_create
val{unsigned long} the integer to be sent
返回
{int} value (>= 0) returned

◆ acl_channel_sendul_nb()

FIBER_API int acl_channel_sendul_nb ( ACL_CHANNEL c,
unsigned long  val 
)

sent unsigned integer to specified channel in non-block mode

参数
c{ACL_CHANNEL*} created by acl_channel_create
val{unsigned long} integer to be sent
返回
{int} value(>= 0) returned