OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/memory/shared_memory_handle.h" | 5 #include "base/memory/shared_memory_handle.h" |
6 | 6 |
7 #include <mach/mach_vm.h> | 7 #include <mach/mach_vm.h> |
| 8 #include <stddef.h> |
8 #include <sys/mman.h> | 9 #include <sys/mman.h> |
9 #include <unistd.h> | 10 #include <unistd.h> |
10 | 11 |
11 #include "base/mac/mac_util.h" | 12 #include "base/mac/mac_util.h" |
12 #include "base/posix/eintr_wrapper.h" | 13 #include "base/posix/eintr_wrapper.h" |
13 | 14 |
14 namespace base { | 15 namespace base { |
15 | 16 |
16 static_assert(sizeof(SharedMemoryHandle::Type) <= | 17 static_assert(sizeof(SharedMemoryHandle::Type) <= |
17 sizeof(SharedMemoryHandle::TypeWireFormat), | 18 sizeof(SharedMemoryHandle::TypeWireFormat), |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 case MACH: | 233 case MACH: |
233 memory_object_ = handle.memory_object_; | 234 memory_object_ = handle.memory_object_; |
234 size_ = handle.size_; | 235 size_ = handle.size_; |
235 pid_ = handle.pid_; | 236 pid_ = handle.pid_; |
236 ownership_passes_to_ipc_ = handle.ownership_passes_to_ipc_; | 237 ownership_passes_to_ipc_ = handle.ownership_passes_to_ipc_; |
237 break; | 238 break; |
238 } | 239 } |
239 } | 240 } |
240 | 241 |
241 } // namespace base | 242 } // namespace base |
OLD | NEW |