[EMAIL PROTECTED] writes:

>   pthread_t tid1;
>   int a = 1;
>   pthread_create(NULL,NULL,thrfunc,NULL);

The Single Unix specification:

http://www.opengroup.org/onlinepubs/007908799/xsh/pthread_create.html

is not 100% precise on whether the first argument to
pthread_create(), `thread', cannot be NULL, but it says that
"Upon successful completion, pthread_create() stores the ID of
the created thread in the location referenced by `thread'."

And actually, substituting the last line of your program with the
following fixes your problem:

  pthread_create(&tid1,NULL,thrfunc,NULL);

See you.

-- 
Guillaume Cottenceau, MandrakeSoft
See you on Cooker! http://www.linux-mandrake.com/en/cookerdevel.php3



_______________________________________________
Redhat-devel-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-devel-list

Reply via email to