Re: pthread



Syren Baran <syren@xxxxxx> wrote:
Eric Sosman schrieb:

int main(void){
pthread_t* pt;

Discard the `*' ...

pthread_create(pt,NULL,thread,NULL);

... and insert a `&' after the `('.

pthread_exit(NULL);
}
Dang. Thanks. Some erros are to obvious to see at times :-|

It might help if you cranked up the optimization and/or warning level of
your compiler. With the proper settings GCC, for example, would have emitted
a warning about use of possibly uninitialized object. In this case, with
GCC, "-Wall -O1" catches this error.

Most optimizing compilers can catch this.
.