单选题
有如下C语言程序
void * th_f(void * arg)
{
printf("Hello World");
}
int main(void)
{
pthreadt_rid;
int st;
st=pthread_create(&tid, NULL, th_f, NULL);
if(st==0)
printf("Oops, I can not createthread\n");
exit(NULL);
}
针对上述程序,下列叙述中哪一个是正确的?
A、
线程th_f运行中出现错误
B、
线程th_f运行后等待一个特定的线程退出
C、
线程th_f运行后主动释放CPU给其他线程
D、
线程th_f运行后退出
【正确答案】
D
【答案解析】
提交答案
关闭