CrossProcessSemaphore is unimplemented on OSX
Categories
(Core :: IPC, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox119 | --- | fixed |
People
(Reporter: handyman, Assigned: lsalzman)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [sp3])
Attachments
(1 file)
CrossProcessSemaphore is currently used in TextureClient's TextureReadLock and in Bob Owen's upcoming Canvas 2D work in bug 1464032. Right now, the mac implementation uses CrossProcessSemaphore_unimplemented. POSIX semaphores are unimplemented on mac and (I think) its SYS V semaphores don't support timed shared semaphores either. It looks like Mach has a solution and :jld mentioned on IRC that the Mojo library must do something (looks like Mach to me).
Comment 1•6 years ago
|
||
Mojo has the ability to attach Mach ports to messages, which would allow using Mach semaphores; the closest thing we have for that is the parallel IPC system buried in SharedMemoryBasic_mach.mm
, or the (very likely bit-rotted) patches in bug 1480205 which add a MachEndpoint
usable in a similar way to IPC's Endpoint<T>
.
Mojo also has data pipes, for streaming data between two processes in shared memory, which is what at least some of the semaphore use cases are trying to do; for signaling full/empty conditions they seem to just use Mojo's node/channel network (the same thing that message pipes are multiplexed onto) rather than an OS-level semaphore.
Updated•6 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 2•1 year ago
|
||
Unnamed POSIX semaphores are not supported on macOS, nor is timed wait supported on
named POSIX semaphores. SysV semaphores have similar limitations.
Mach semaphores are one of the only clean ways to create unnamed, shareable semaphores
on macOS. As of bug 1734735, we now can transparently send the mach ports across to
other processes without much added code, overall making this implementation of Mach
semaphores fairly easy.
Updated•1 year ago
|
Comment 3•1 year ago
|
||
The following patch is waiting for review from a reviewer who resigned from the review:
ID | Title | Author | Reviewer Status |
---|---|---|---|
D188429 | Bug 1553691 - Implement CrossProcessSemaphore on macOS using Mach semaphores. r?bobowen | lsalzman | bobowen: Resigned from review |
:lsalzman, could you please find another reviewer?
For more information, please visit BugBot documentation.
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Comment 5•1 year ago
|
||
bugherder |
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Description
•