È normale che il numero identificativo dei threads sia negativo?
codice:#include<stdio.h>#include<stdlib.h> #include<pthread.h> void *thread_function(); int main() { pthread_t thread; if( 0 != pthread_create(&thread, NULL, thread_function, NULL) ) { perror("impossible thread creation"); exit(1); } pthread_join(thread, NULL); return 0; } void *thread_function() { printf("thread number = %ld\n", pthread_self()); }codice:$ cc -pthread athread.c$ ./a.out thread number = -1218548928 $