// gcc -g -o test -lpthread tester2.c #include #include #include pthread_t tester_thread; pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t cond = PTHREAD_COND_INITIALIZER; void *do_it () { int t = 34543; while (t > 0) t--; fprintf (stderr,"tester_thread: looping\n"); while (1); return NULL; } void bak () { while (1) { fprintf (stderr,"main: looping\n"); while (1); } } void baz () { int a; int b = 0; bak (); } void bar () { close (-1); close (-1); baz (); /*Comment */ } void foo () { bar (); } int main (char **argv, int argc) { pthread_attr_t attr; pthread_attr_init (&attr); pthread_create (&tester_thread, &attr, do_it, NULL); /* This is a comment */ foo (); int t = 30; exit (0); }