我要评分
获取效率
正确性
完整性
易理解

Creating a CoMP Context

This section adds the setting of the callback function for the poll thread to invoke after the task is complete.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
static void _zip_cb(void *message, void *utag)
{
struct user_async_tag *tag = utag;
 void *ctx = tag->ctx;
 int thread_id = tag->thread_id;
 int cnt = tag->cnt;
struct wcrypto_comp_msg  *msg = message;
if (msg->status = WD_SUCCESS)
printf("thread %d do ZIP %dth time success!\n", thread_id, cnt);
else
printf("thread %d do ZIP %dth time fail(status=%d)!\n", thread_id, cnt, 
msg->status);
free(utag);}
setup.cb = (void *)__zip_cb;
......