Re: pthread
- From: William Ahern <william@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 16 Jan 2008 12:28:50 -0800
Syren Baran <syren@xxxxxx> wrote:
Eric Sosman schrieb:
Dang. Thanks. Some erros are to obvious to see at times :-|int main(void){
pthread_t* pt;
Discard the `*' ...
pthread_create(pt,NULL,thread,NULL);
... and insert a `&' after the `('.
pthread_exit(NULL);
}
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.
.
- References:
- pthread
- From: Syren Baran
- Re: pthread
- From: Eric Sosman
- Re: pthread
- From: Syren Baran
- pthread
- Prev by Date: Re: Socket Programming: How to terminate a thread "listening" for UDP packets?
- Next by Date: Re: How to wait until the other end of a FIFO is reopened.
- Previous by thread: Re: pthread
- Next by thread: Does ever growing SZ from ps indicate memory leak?
- Index(es):