mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 1479960 - Remove SHM_ANON support. r=froydnj
FreeBSD's SHM_ANON is useful for the usual case of shared memory, but it doesn't support freezing. It could be re-added later, but for now it's simplest to remove it (and use named shm instead) while refactoring. Depends on D26738 Differential Revision: https://phabricator.services.mozilla.com/D26739 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
f32394bec8
commit
ef4778bda8
@ -61,7 +61,7 @@ SharedMemoryHandle SharedMemory::NULLHandle() { return SharedMemoryHandle(); }
|
||||
|
||||
// static
|
||||
bool SharedMemory::AppendPosixShmPrefix(std::string* str, pid_t pid) {
|
||||
#if defined(ANDROID) || defined(SHM_ANON)
|
||||
#if defined(ANDROID)
|
||||
return false;
|
||||
#else
|
||||
*str += '/';
|
||||
@ -87,7 +87,7 @@ bool SharedMemory::AppendPosixShmPrefix(std::string* str, pid_t pid) {
|
||||
// enough for this.
|
||||
StringAppendF(str, "org.mozilla.ipc.%d.", static_cast<int>(pid));
|
||||
return true;
|
||||
#endif // !ANDROID && !SHM_ANON
|
||||
#endif // !ANDROID
|
||||
}
|
||||
|
||||
bool SharedMemory::Create(size_t size) {
|
||||
@ -112,10 +112,6 @@ bool SharedMemory::Create(size_t size) {
|
||||
return false;
|
||||
}
|
||||
needs_truncate = false;
|
||||
#elif defined(SHM_ANON)
|
||||
// FreeBSD (or any other Unix that might decide to implement this
|
||||
// nice, simple API):
|
||||
fd = shm_open(SHM_ANON, O_RDWR, 0600);
|
||||
#else
|
||||
// Generic Unix: shm_open + shm_unlink
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user