Sxiao_ 2017-10-16 13:21 采纳率: 50%
浏览 677

看到一段程序,里面一些关于线程的代码有些看不懂

pthread_t thrReceive = 0;
意思是不是定义一个进程号,值为0

  • 写回答

1条回答 默认 最新

  • wanwan_1996 2017-10-17 00:47
    关注
    其实应该是这样的:
    int pthread_create(pthread_t *thread, const pthread_attr_t *attr,
                       void *(*start_routine) (void *), void *arg);
    
    你的thrReceive 只是获取线程id的变量,最后线程创建成功,他就是你创建的线程对应的线程id
    
    
    评论

报告相同问题?