On Fri, Sep 16, 2011 at 9:19 PM, Adam Lackorzynski < adam@os.inf.tu-dresden.de> wrote:
Code: printf("new loop...\n"); pthread_create(&t1, NULL, thread, (void*)1); res = pthread_detach(&t1); printf("Detach thread 1 (%d)\n", res); pthread_create(&t2, NULL, thread, (void*)2); res = pthread_detach(&t2);
pthread_detach does not take a pointer of pthread_t, just pthread_t.
Sorry. It's my mistake :)