З🧟
Size: a a a
З🧟
НА
ia
ia
НА
НА
НА
НА
ia
ia
НА
ia
ia
З🧟
#include <pthread.h>
#include <stdio.h>
void *hello()
{
printf("hello in thread\n");
return NULL;
}
int main()
{
int y = 0;
pthread_t increment_x_thread;
if(pthread_create(&increment_x_thread, NULL, hello, NULL)) {
fprintf(stderr, "Error creating thread\n");
return 1;
}
while(++y < 100);
if(pthread_join(increment_x_thread, NULL)) {
fprintf(stderr, "Error joining thread\n");
return 2;
}
printf("hellos: %d,\n", y);
return 0;
}
S
#include <pthread.h>
#include <stdio.h>
void *hello()
{
printf("hello in thread\n");
return NULL;
}
int main()
{
int y = 0;
pthread_t increment_x_thread;
if(pthread_create(&increment_x_thread, NULL, hello, NULL)) {
fprintf(stderr, "Error creating thread\n");
return 1;
}
while(++y < 100);
if(pthread_join(increment_x_thread, NULL)) {
fprintf(stderr, "Error joining thread\n");
return 2;
}
printf("hellos: %d,\n", y);
return 0;
}