This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

pthread_rwlock and writers preference


Hi!

Cyril Hrubis once reported a bug about pthread_rwlock() posix tests in LTP:
https://sourceware.org/bugzilla/show_bug.cgi?id=13701

And there were some clarification requests for Austin Group about this issue.
see:

http://austingroupbugs.net/view.php?id=720
http://austingroupbugs.net/view.php?id=722

According to the discussion results, it seems that write locks should be implemented to
take precedence before the read locks. 

But actually in glibc, if a reader has owned the lock and a writers is waiting on the lock,
now if another reader tries to get this lock, it will succeed. This is not correct behavior
according to pthread_rwlock_rdlock()'s manpage.

Would anyone help to confirm whether is this a glibc bug or should be fixed? Thanks.

Regards,
Xiaoguang Wang


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]