This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/13701] pthread_rwlock_rdlock & realtime scheduling writer lock precedence
- From: "triegel at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Thu, 05 Jan 2017 06:35:44 +0000
- Subject: [Bug nptl/13701] pthread_rwlock_rdlock & realtime scheduling writer lock precedence
- Auto-submitted: auto-generated
- References: <bug-13701-131@http.sourceware.org/bugzilla/>
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.