> Quoting your code:
>
>free(q);
> if (err = pthread_rwlock_unlock(q->data->rwlock)) {
>
> q is freed, and then use as an argument to pthread_rwlock_unlock().
>
Wow. Sorry, usually I'm not SO stupid. But anyway this was not the problem
I was talking about. Moving "free(q)" down did
On Thu, Oct 23, 2008 at 07:41:47PM +0700, Alexey Salmin wrote:
> > Freeing a variable...
> >
> > > if (err = pthread_rwlock_unlock(q->data->rwlock)) {
> >
> > ...and using it later is never a good idea. This is a problem in your
> > program, closing the bug.
>
>
> ? Can you please explain w
> Freeing a variable...
>
> > if (err = pthread_rwlock_unlock(q->data->rwlock)) {
>
> ...and using it later is never a good idea. This is a problem in your
> program, closing the bug.
? Can you please explain where am I freeing a variable? AFAIK
"pthread_rwlock_unlock" function releases the
Thank you very much for answering me. And if you don't mind I'll ask one
more question. In the open group manual there is this line "Implementations
are allowed
to favour writers over readers to avoid writer starvation."
And linux manual says: "If the Thread Execution Scheduling option is
supporte
2008/10/23 Petr Salinger <[EMAIL PROTECTED]>:
> The presented behaviour of pthread_rwlock_rdlock() is POSIX compliant.
>
> The
http://opengroup.org/onlinepubs/007908799/xsh/pthread_rwlock_rdlock.html
> says explicitely:
>
> The calling thread acquires the read lock if a writer does not hold the
loc
The presented behaviour of pthread_rwlock_rdlock() is POSIX compliant.
The http://opengroup.org/onlinepubs/007908799/xsh/pthread_rwlock_rdlock.html
says explicitely:
The calling thread acquires the read lock if a writer does not hold the
lock and there are no writers blocked on the lock.
It is
Package: libc6
Version: 2.7-15
Severity: normal
*** Please type your report below this line ***
Hello! At first I want to say that I'm not sure that debian
tracking system is a right place for my question and I
apologize if it really is not. I already sent it to the
gcc-help mailing list but got
7 matches
Mail list logo