Move platform-dependent parts of RWLock to mozglue
Categories
(Core :: mozglue, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox99 | --- | fixed |
People
(Reporter: mozbugz, Assigned: mozbugz)
References
Details
Attachments
(2 files)
I have a need for a readers-writer lock (aka shared lock) in the Base Profiler, and we already have mozilla::RWLock
, but it's in xpcom.
Similar to how mozilla::Mutex
in xpcom uses a light class mozilla::detail::MutexImpl
in mozglue/misc/PlatformMutex.h, I would like to have a mozilla::detail::RWLockImpl
in mozglue/misc/PlatformRWLock.h, which would contain the minimal platform-dependent API to implement RWLock
.
(And I could use that RWLockImpl
in the Base Profiler, like I already use MutexImpl
.)
Assignee | ||
Comment 1•2 years ago
|
||
This is consistent with how xpcom's Mutex has its platform-dependent code in mozglue, and will allow readers-writer locks in mozglue without duplication.
Assignee | ||
Comment 2•2 years ago
|
||
Depends on D139669
Pushed by gsquelart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6ad74e152f2e Move minimal platform-dependent part of RWLock to mozglue/misc/PlatformRWLock.h&cpp - r=glandium,xpcom-reviewers https://hg.mozilla.org/integration/autoland/rev/128be99c373b Sprinkle [[nodiscard]] and =delete in RWLock.h - r=glandium,xpcom-reviewers
Comment 4•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6ad74e152f2e
https://hg.mozilla.org/mozilla-central/rev/128be99c373b
Description
•