Hi, I got a problem with pthread_create
code:
According to the man page of pthread_create the tid gets stored in tid1, but when I try and print it out I only get like -1204387023 something, instead of the correct tid of the thread I just created?Code:pthread_t tid1;
pthread_create(&tid1, NULL, thread1, (void *)tst);
printf("tid: %d\n", tid1);