程序代写 #include – cscodehelp代写

#include
#include

thread_func (void *ptr)

Copyright By cscodehelp代写 加微信 cscodehelp

printf (“%s
”, (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
”, t1_ret, t2_ret);

程序代写 CS代考 加微信: cscodehelp QQ: 2235208643 Email: kyit630461@163.com

Leave a Reply

Your email address will not be published. Required fields are marked *