| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 dynamic_pthread_setname_np(name); | 599 dynamic_pthread_setname_np(name); |
| 600 #elif defined(PR_SET_NAME) | 600 #elif defined(PR_SET_NAME) |
| 601 prctl(PR_SET_NAME, | 601 prctl(PR_SET_NAME, |
| 602 reinterpret_cast<unsigned long>(name), // NOLINT | 602 reinterpret_cast<unsigned long>(name), // NOLINT |
| 603 0, 0, 0); | 603 0, 0, 0); |
| 604 #endif | 604 #endif |
| 605 } | 605 } |
| 606 | 606 |
| 607 | 607 |
| 608 static void* ThreadEntry(void* arg) { | 608 static void* ThreadEntry(void* arg) { |
| 609 #if V8_OS_QNX && V8_HOST_ARCH_ARM |
| 610 // On QNX/ARM, subnormal float support is a per-thread setting, |
| 611 // disabled by default. Enable it in all new threads. |
| 612 OS::ArmEnableSubnormalFloat(); |
| 613 #endif |
| 609 Thread* thread = reinterpret_cast<Thread*>(arg); | 614 Thread* thread = reinterpret_cast<Thread*>(arg); |
| 610 // This is also initialized by the first argument to pthread_create() but we | 615 // This is also initialized by the first argument to pthread_create() but we |
| 611 // don't know which thread will run first (the original thread or the new | 616 // don't know which thread will run first (the original thread or the new |
| 612 // one) so we initialize it here too. | 617 // one) so we initialize it here too. |
| 613 thread->data()->thread_ = pthread_self(); | 618 thread->data()->thread_ = pthread_self(); |
| 614 SetThreadName(thread->name()); | 619 SetThreadName(thread->name()); |
| 615 ASSERT(thread->data()->thread_ != kNoThread); | 620 ASSERT(thread->data()->thread_ != kNoThread); |
| 616 thread->NotifyStartedAndRun(); | 621 thread->NotifyStartedAndRun(); |
| 617 return NULL; | 622 return NULL; |
| 618 } | 623 } |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 | 781 |
| 777 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { | 782 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { |
| 778 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); | 783 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); |
| 779 int result = pthread_setspecific(pthread_key, value); | 784 int result = pthread_setspecific(pthread_key, value); |
| 780 ASSERT_EQ(0, result); | 785 ASSERT_EQ(0, result); |
| 781 USE(result); | 786 USE(result); |
| 782 } | 787 } |
| 783 | 788 |
| 784 | 789 |
| 785 } } // namespace v8::internal | 790 } } // namespace v8::internal |
| OLD | NEW |