OLD | NEW |
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 Solaris 10 goes here. For the POSIX-compatible | 5 // Platform-specific code for Solaris 10 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 #ifdef __sparc | 8 #ifdef __sparc |
9 # error "V8 does not support the SPARC CPU architecture." | 9 # error "V8 does not support the SPARC CPU architecture." |
10 #endif | 10 #endif |
11 | 11 |
12 #include <sys/stack.h> // for stack alignment | 12 #include <sys/stack.h> // for stack alignment |
13 #include <unistd.h> // getpagesize(), usleep() | 13 #include <unistd.h> // getpagesize(), usleep() |
14 #include <sys/mman.h> // mmap() | 14 #include <sys/mman.h> // mmap() |
15 #include <ucontext.h> // walkstack(), getcontext() | 15 #include <ucontext.h> // walkstack(), getcontext() |
16 #include <dlfcn.h> // dladdr | 16 #include <dlfcn.h> // dladdr |
17 #include <pthread.h> | 17 #include <pthread.h> |
18 #include <semaphore.h> | 18 #include <semaphore.h> |
19 #include <time.h> | 19 #include <time.h> |
20 #include <sys/time.h> // gettimeofday(), timeradd() | 20 #include <sys/time.h> // gettimeofday(), timeradd() |
21 #include <errno.h> | 21 #include <errno.h> |
22 #include <ieeefp.h> // finite() | 22 #include <ieeefp.h> // finite() |
23 #include <signal.h> // sigemptyset(), etc | 23 #include <signal.h> // sigemptyset(), etc |
24 #include <sys/regset.h> | 24 #include <sys/regset.h> |
25 | 25 |
26 | 26 |
27 #undef MAP_TYPE | 27 #undef MAP_TYPE |
28 | 28 |
29 #include "v8.h" | 29 #include "src/v8.h" |
30 | 30 |
31 #include "platform.h" | 31 #include "src/platform.h" |
32 #include "v8threads.h" | 32 #include "src/v8threads.h" |
33 | 33 |
34 | 34 |
35 // It seems there is a bug in some Solaris distributions (experienced in | 35 // It seems there is a bug in some Solaris distributions (experienced in |
36 // SunOS 5.10 Generic_141445-09) which make it difficult or impossible to | 36 // SunOS 5.10 Generic_141445-09) which make it difficult or impossible to |
37 // access signbit() despite the availability of other C99 math functions. | 37 // access signbit() despite the availability of other C99 math functions. |
38 #ifndef signbit | 38 #ifndef signbit |
39 namespace std { | 39 namespace std { |
40 // Test sign - usually defined in math.h | 40 // Test sign - usually defined in math.h |
41 int signbit(double x) { | 41 int signbit(double x) { |
42 // We need to take care of the special case of both positive and negative | 42 // We need to take care of the special case of both positive and negative |
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 return munmap(base, size) == 0; | 311 return munmap(base, size) == 0; |
312 } | 312 } |
313 | 313 |
314 | 314 |
315 bool VirtualMemory::HasLazyCommits() { | 315 bool VirtualMemory::HasLazyCommits() { |
316 // TODO(alph): implement for the platform. | 316 // TODO(alph): implement for the platform. |
317 return false; | 317 return false; |
318 } | 318 } |
319 | 319 |
320 } } // namespace v8::internal | 320 } } // namespace v8::internal |
OLD | NEW |