Chromium Code Reviews| Index: src/platform-linux.cc |
| diff --git a/src/platform-linux.cc b/src/platform-linux.cc |
| index 1f9cde151c13f554a108a4b90b74573187808cdd..701843a646d8622ea68db8bb2624cdc8138fe40f 100644 |
| --- a/src/platform-linux.cc |
| +++ b/src/platform-linux.cc |
| @@ -428,6 +428,8 @@ void OS::DebugBreak() { |
| # endif |
| #elif defined(__mips__) |
| asm("break"); |
| +#elif defined(__native_client__) |
| + asm("hlt"); |
| #else |
| asm("int $3"); |
| #endif |
| @@ -822,12 +824,16 @@ void Thread::set_name(const char* name) { |
| void Thread::Start() { |
| pthread_attr_t* attr_ptr = NULL; |
| +#if defined(__native_client__) |
| + // use default stack size. |
| +#else |
| pthread_attr_t attr; |
| if (stack_size_ > 0) { |
| pthread_attr_init(&attr); |
| pthread_attr_setstacksize(&attr, static_cast<size_t>(stack_size_)); |
| attr_ptr = &attr; |
| } |
| +#endif |
| int result = pthread_create(&data_->thread_, attr_ptr, ThreadEntry, this); |
| CHECK_EQ(0, result); |
| ASSERT(data_->thread_ != kNoThread); |
| @@ -1074,6 +1080,10 @@ static int GetThreadID() { |
| static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) { |
| +#if defined(__native_client__) && defined(__x86_64__) |
| + // Profiling is disabled for x86_64 Native Client. |
|
ulan
2013/04/08 11:27:10
Is this #ifdef needed because of undefined ucontex
Brad Chen
2013/04/08 16:29:56
No, in this case the problem is more fundamental,
Brad Chen
2013/04/08 16:38:32
It might be possible to get this code to compile u
|
| + return; |
| +#else |
| USE(info); |
| if (signal != SIGPROF) return; |
| Isolate* isolate = Isolate::UncheckedCurrent(); |
| @@ -1126,6 +1136,7 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) { |
| #endif // V8_HOST_ARCH_* |
| sampler->SampleStack(sample); |
| sampler->Tick(sample); |
| +#endif // __native_client__ && __x86_64__ |
| } |