程序代写 #include

#include
#include

thread_func (void *ptr)

Copyright By PowCoder代写 加微信 powcoder

printf (“%s \n”, (char *) ptr);

pthread_t t1, t2;
char *msg1 = “Thread 1”;
char *msg2 = “Thread 2”;
int t1_ret, t2_ret;

t1_ret = pthread_create (&t1, NULL, (void *) &thread_func, (void *) msg1);
t2_ret = pthread_create (&t2, NULL, (void *) &thread_func, (void *) msg2);

pthread_join (t1, NULL);
pthread_join (t2, NULL);

printf (“Threads finished with %d/%d codes\n”, t1_ret, t2_ret);

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com