This is the mail archive of the glibc-bugs@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]

[Bug nptl/13701] pthread_rwlock_rdlock & realtime scheduling writer lock precedence


https://sourceware.org/bugzilla/show_bug.cgi?id=13701

--- Comment #9 from Torvald Riegel <triegel at redhat dot com> ---
(In reply to Bruno Haible from comment #8)
> (In reply to Torvald Riegel from comment #7)
> > we're certainly not going to track which reader exactly has acquired a
> > particular rdlock
> It could be done by allocating a variable in thread-local storage
> (pthread_key_create). But I agree that such an implementation would be
> costly in pthread_rwlock_init (since pthread_key_create does a linear
> search).

It's not just that.  If a thread acquires more than one rwlock as a reader, it
has to track a set of acquired rwlocks, and query inclusion in this set on
every rdlock call.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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