| 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 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 989 Semaphore* OS::CreateSemaphore(int count) { | 989 Semaphore* OS::CreateSemaphore(int count) { |
| 990 return new LinuxSemaphore(count); | 990 return new LinuxSemaphore(count); |
| 991 } | 991 } |
| 992 | 992 |
| 993 | 993 |
| 994 void OS::SetUp() { | 994 void OS::SetUp() { |
| 995 // Seed the random number generator. We preserve microsecond resolution. | 995 // Seed the random number generator. We preserve microsecond resolution. |
| 996 uint64_t seed = Ticks() ^ (getpid() << 16); | 996 uint64_t seed = Ticks() ^ (getpid() << 16); |
| 997 srandom(static_cast<unsigned int>(seed)); | 997 srandom(static_cast<unsigned int>(seed)); |
| 998 limit_mutex = CreateMutex(); | 998 limit_mutex = CreateMutex(); |
| 999 | |
| 1000 #ifdef __arm__ | |
| 1001 // When running on ARM hardware check that the EABI used by V8 and | |
| 1002 // by the C code is the same. | |
| 1003 bool hard_float = OS::ArmUsingHardFloat(); | |
| 1004 if (hard_float) { | |
| 1005 #if !USE_EABI_HARDFLOAT | |
| 1006 PrintF("ERROR: Binary compiled with -mfloat-abi=hard but without " | |
| 1007 "-DUSE_EABI_HARDFLOAT\n"); | |
| 1008 exit(1); | |
| 1009 #endif | |
| 1010 } else { | |
| 1011 #if USE_EABI_HARDFLOAT | |
| 1012 PrintF("ERROR: Binary not compiled with -mfloat-abi=hard but with " | |
| 1013 "-DUSE_EABI_HARDFLOAT\n"); | |
| 1014 exit(1); | |
| 1015 #endif | |
| 1016 } | |
| 1017 #endif | |
| 1018 } | 999 } |
| 1019 | 1000 |
| 1020 | 1001 |
| 1021 void OS::TearDown() { | 1002 void OS::TearDown() { |
| 1022 delete limit_mutex; | 1003 delete limit_mutex; |
| 1023 } | 1004 } |
| 1024 | 1005 |
| 1025 | 1006 |
| 1026 } } // namespace v8::internal | 1007 } } // namespace v8::internal |
| OLD | NEW |