|
|
请教各位:
示例代码如下:
pthread_t thread_a,thread_b,thread_c;
void a()
{
while(1)
do_something;
}
void b()
{
while(1)
do_something;
}
void c()
{
while(1)
do_something;
}
void d()
{
pthread_create(&thread_c,NULL,c,NULL);
pthread_join(thread_c,NULL);
}
int main()
{
pthread_create(&thread_a,NULL,a,NULL);
d();
pthread_create(&thread_b,NULL,b,NULL);
return 1;
}
我现在想问的是,有什么办法可以让pthread_create(&thread_b,NULL,b,NULL);执行呢?
也就是说让函数b()执行呢?有什么办法呢?要调用写什么操作呢?
谢谢了 |
|