【发布时间】:2015-01-26 10:29:33
【问题描述】:
我看过pthread_create的文档
在他们使用的底部示例中:
pthread_create(&tinfo[tnum].thread_id, &attr, &thread_start, &tinfo[tnum]);
&thread_start - 与&
但在我在网上看到的其他示例中,他们没有使用&:
pthread_create(&tinfo[tnum].thread_id, &attr, thread_start, &tinfo[tnum]);
我也进行了测试,没有& 也可以工作。
但是哪种方法是正确的呢?
【问题讨论】:
标签: c pthreads function-pointers