#include thread_func (void *ptr) Copyright By PowCoder代写 加微信 powcoder printf (“%s \n”, (char *) ptr); pthread_t t1, t2; t1_ret = pthread_create (&t1, NULL, (void *) &thread_func, (void *) msg1); pthread_join (t1, NULL); printf (“Threads finished with %d/%d codes\n”, t1_ret, t2_ret); 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com
#include
char *msg1 = “Thread 1”;
char *msg2 = “Thread 2”;
int t1_ret, t2_ret;
t2_ret = pthread_create (&t2, NULL, (void *) &thread_func, (void *) msg2);
pthread_join (t2, NULL);