| 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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 589 kMacTlsBaseOffset = 0x60; | 589 kMacTlsBaseOffset = 0x60; |
| 590 #endif | 590 #endif |
| 591 } else { | 591 } else { |
| 592 // 11.x.x (Lion) changed the offset. | 592 // 11.x.x (Lion) changed the offset. |
| 593 kMacTlsBaseOffset = 0; | 593 kMacTlsBaseOffset = 0; |
| 594 } | 594 } |
| 595 | 595 |
| 596 Release_Store(&tls_base_offset_initialized, 1); | 596 Release_Store(&tls_base_offset_initialized, 1); |
| 597 } | 597 } |
| 598 | 598 |
| 599 |
| 599 static void CheckFastTls(Thread::LocalStorageKey key) { | 600 static void CheckFastTls(Thread::LocalStorageKey key) { |
| 600 void* expected = reinterpret_cast<void*>(0x1234CAFE); | 601 void* expected = reinterpret_cast<void*>(0x1234CAFE); |
| 601 Thread::SetThreadLocal(key, expected); | 602 Thread::SetThreadLocal(key, expected); |
| 602 void* actual = Thread::GetExistingThreadLocal(key); | 603 void* actual = Thread::GetExistingThreadLocal(key); |
| 603 if (expected != actual) { | 604 if (expected != actual) { |
| 604 V8_Fatal(__FILE__, __LINE__, | 605 V8_Fatal(__FILE__, __LINE__, |
| 605 "V8 failed to initialize fast TLS on current kernel"); | 606 "V8 failed to initialize fast TLS on current kernel"); |
| 606 } | 607 } |
| 607 Thread::SetThreadLocal(key, NULL); | 608 Thread::SetThreadLocal(key, NULL); |
| 608 } | 609 } |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 limit_mutex = CreateMutex(); | 745 limit_mutex = CreateMutex(); |
| 745 } | 746 } |
| 746 | 747 |
| 747 | 748 |
| 748 void OS::TearDown() { | 749 void OS::TearDown() { |
| 749 delete limit_mutex; | 750 delete limit_mutex; |
| 750 } | 751 } |
| 751 | 752 |
| 752 | 753 |
| 753 } } // namespace v8::internal | 754 } } // namespace v8::internal |
| OLD | NEW |