鲲鹏社区首页
中文
注册
我要评分
文档获取效率
文档正确性
内容完整性
文档易理解
在线提单
论坛求助

基于Context进行COMP任务操作

参照4.4.3节,仅增加tag入参,用于任务完成后,poll线程中回调函数调用的入参。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
struct zip_async_tag {
void *ctx;
void *pool;
int thread_id;
int cnt;
} *tag;
int i = 0;
tag = malloc(sizeof(*tag));
tag->ctx = ctx;
tag->thread_id = thread_id;
tag->cnt = i;
tag->pool = pool;
wcrypto_comp_poll (ctx, &opdata, tag);