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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 useconds_t ms = static_cast<useconds_t>(milliseconds); | 215 useconds_t ms = static_cast<useconds_t>(milliseconds); |
216 usleep(1000 * ms); | 216 usleep(1000 * ms); |
217 } | 217 } |
218 | 218 |
219 | 219 |
220 void OS::Abort() { | 220 void OS::Abort() { |
221 // Redirect to std abort to signal abnormal program termination. | 221 // Redirect to std abort to signal abnormal program termination. |
222 if (FLAG_break_on_abort) { | 222 if (FLAG_break_on_abort) { |
223 DebugBreak(); | 223 DebugBreak(); |
224 } | 224 } |
225 V8_IMMEDIATE_CRASH(); | 225 abort(); |
226 } | 226 } |
227 | 227 |
228 | 228 |
229 void OS::DebugBreak() { | 229 void OS::DebugBreak() { |
230 #if V8_HOST_ARCH_ARM | 230 #if V8_HOST_ARCH_ARM |
231 asm("bkpt 0"); | 231 asm("bkpt 0"); |
232 #elif V8_HOST_ARCH_MIPS | 232 #elif V8_HOST_ARCH_MIPS |
233 asm("break"); | 233 asm("break"); |
234 #elif V8_HOST_ARCH_IA32 | 234 #elif V8_HOST_ARCH_IA32 |
235 #if defined(__native_client__) | 235 #if defined(__native_client__) |
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 | 731 |
732 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { | 732 void Thread::SetThreadLocal(LocalStorageKey key, void* value) { |
733 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); | 733 pthread_key_t pthread_key = LocalKeyToPthreadKey(key); |
734 int result = pthread_setspecific(pthread_key, value); | 734 int result = pthread_setspecific(pthread_key, value); |
735 ASSERT_EQ(0, result); | 735 ASSERT_EQ(0, result); |
736 USE(result); | 736 USE(result); |
737 } | 737 } |
738 | 738 |
739 | 739 |
740 } } // namespace v8::internal | 740 } } // namespace v8::internal |
OLD | NEW |