/* incprint.c - one thread increments, the other prints */ #include #include #define NUM 5 int counter = 0; main() { pthread_t t1; /* one thread */ void *print_count(void *); /* its function */ int i; pthread_create(&t1, NULL, print_count, NULL); for( i = 0 ; i