Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: src/base/platform/platform-freebsd.cc

Issue 839053004: src: fix build on freebsd (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/base/platform/platform-posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project 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 // Platform-specific code for FreeBSD goes here. For the POSIX-compatible 5 // Platform-specific code for FreeBSD goes here. For the POSIX-compatible
6 // parts, the implementation is in platform-posix.cc. 6 // parts, the implementation is in platform-posix.cc.
7 7
8 #include <pthread.h> 8 #include <pthread.h>
9 #include <semaphore.h> 9 #include <semaphore.h>
10 #include <signal.h> 10 #include <signal.h>
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 ssize_t bytes_read = read(fd, addr_buffer + 2, 8); 134 ssize_t bytes_read = read(fd, addr_buffer + 2, 8);
135 if (bytes_read < 8) break; 135 if (bytes_read < 8) break;
136 unsigned start = StringToLong(addr_buffer); 136 unsigned start = StringToLong(addr_buffer);
137 bytes_read = read(fd, addr_buffer + 2, 1); 137 bytes_read = read(fd, addr_buffer + 2, 1);
138 if (bytes_read < 1) break; 138 if (bytes_read < 1) break;
139 if (addr_buffer[2] != '-') break; 139 if (addr_buffer[2] != '-') break;
140 bytes_read = read(fd, addr_buffer + 2, 8); 140 bytes_read = read(fd, addr_buffer + 2, 8);
141 if (bytes_read < 8) break; 141 if (bytes_read < 8) break;
142 unsigned end = StringToLong(addr_buffer); 142 unsigned end = StringToLong(addr_buffer);
143 char buffer[MAP_LENGTH]; 143 char buffer[MAP_LENGTH];
144 int bytes_read = -1; 144 bytes_read = -1;
145 do { 145 do {
146 bytes_read++; 146 bytes_read++;
147 if (bytes_read >= MAP_LENGTH - 1) 147 if (bytes_read >= MAP_LENGTH - 1)
148 break; 148 break;
149 bytes_read = read(fd, buffer + bytes_read, 1); 149 bytes_read = read(fd, buffer + bytes_read, 1);
150 if (bytes_read < 1) break; 150 if (bytes_read < 1) break;
151 } while (buffer[bytes_read] != '\n'); 151 } while (buffer[bytes_read] != '\n');
152 buffer[bytes_read] = 0; 152 buffer[bytes_read] = 0;
153 // Ignore mappings that are not executable. 153 // Ignore mappings that are not executable.
154 if (buffer[3] != 'x') continue; 154 if (buffer[3] != 'x') continue;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 return munmap(base, size) == 0; 298 return munmap(base, size) == 0;
299 } 299 }
300 300
301 301
302 bool VirtualMemory::HasLazyCommits() { 302 bool VirtualMemory::HasLazyCommits() {
303 // TODO(alph): implement for the platform. 303 // TODO(alph): implement for the platform.
304 return false; 304 return false;
305 } 305 }
306 306
307 } } // namespace v8::base 307 } } // namespace v8::base
OLDNEW
« no previous file with comments | « no previous file | src/base/platform/platform-posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698