| 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 POSIX goes here. This is not a platform on its | 5 // Platform-specific code for POSIX goes here. This is not a platform on its |
| 6 // own, but contains the parts which are the same across the POSIX platforms | 6 // own, but contains the parts which are the same across the POSIX platforms |
| 7 // Linux, MacOS, FreeBSD, OpenBSD, NetBSD and QNX. | 7 // Linux, MacOS, FreeBSD, OpenBSD, NetBSD and QNX. |
| 8 | 8 |
| 9 #include <dlfcn.h> | 9 #include <dlfcn.h> |
| 10 #include <pthread.h> | 10 #include <pthread.h> |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #include <netinet/in.h> | 33 #include <netinet/in.h> |
| 34 #include <netdb.h> | 34 #include <netdb.h> |
| 35 | 35 |
| 36 #undef MAP_TYPE | 36 #undef MAP_TYPE |
| 37 | 37 |
| 38 #if defined(ANDROID) && !defined(V8_ANDROID_LOG_STDOUT) | 38 #if defined(ANDROID) && !defined(V8_ANDROID_LOG_STDOUT) |
| 39 #define LOG_TAG "v8" | 39 #define LOG_TAG "v8" |
| 40 #include <android/log.h> | 40 #include <android/log.h> |
| 41 #endif | 41 #endif |
| 42 | 42 |
| 43 #include "v8.h" | 43 #include "src/v8.h" |
| 44 | 44 |
| 45 #include "isolate-inl.h" | 45 #include "src/isolate-inl.h" |
| 46 #include "platform.h" | 46 #include "src/platform.h" |
| 47 | 47 |
| 48 namespace v8 { | 48 namespace v8 { |
| 49 namespace internal { | 49 namespace internal { |
| 50 | 50 |
| 51 // 0 is never a valid thread id. | 51 // 0 is never a valid thread id. |
| 52 static const pthread_t kNoThread = (pthread_t) 0; | 52 static const pthread_t kNoThread = (pthread_t) 0; |
| 53 | 53 |
| 54 | 54 |
| 55 unsigned OS::CpuFeaturesImpliedByPlatform() { | 55 unsigned OS::CpuFeaturesImpliedByPlatform() { |
| 56 return 0; // Nothing special. | 56 return 0; // Nothing special. |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 | 690 |
| 691 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { | 691 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { |
| 692 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); | 692 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); |
| 693 int result = pthread_setspecific(pthread_key, value); | 693 int result = pthread_setspecific(pthread_key, value); |
| 694 ASSERT_EQ(0, result); | 694 ASSERT_EQ(0, result); |
| 695 USE(result); | 695 USE(result); |
| 696 } | 696 } |
| 697 | 697 |
| 698 | 698 |
| 699 } } // namespace v8::internal | 699 } } // namespace v8::internal |
| OLD | NEW |