线程同步----递归锁 (三)

2014-11-24 02:51:53 · 作者: · 浏览: 9
e(&tid[0], &attr,
test0, NULL);
if (ret) {
fprintf(stderr, "create:%s\n", strerror(ret));
exit(1);
}

ret = pthread_create(&tid[0], &attr,
test1, NULL);
if (ret) {
fprintf(stderr, "create:%s\n", strerror(ret));
exit(1);
}

pthread_attr_destroy(&attr);

pthread_exit(NULL);
}