| 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 USE(result); | 164 USE(result); |
| 165 ASSERT(result == 0); | 165 ASSERT(result == 0); |
| 166 } | 166 } |
| 167 | 167 |
| 168 | 168 |
| 169 void OS::Sleep(int milliseconds) { | 169 void OS::Sleep(int milliseconds) { |
| 170 usleep(1000 * milliseconds); | 170 usleep(1000 * milliseconds); |
| 171 } | 171 } |
| 172 | 172 |
| 173 | 173 |
| 174 int OS::NumberOfCores() { |
| 175 return sysconf(_SC_NPROCESSORS_ONLN); |
| 176 } |
| 177 |
| 178 |
| 174 void OS::Abort() { | 179 void OS::Abort() { |
| 175 // Redirect to std abort to signal abnormal program termination | 180 // Redirect to std abort to signal abnormal program termination |
| 176 abort(); | 181 abort(); |
| 177 } | 182 } |
| 178 | 183 |
| 179 | 184 |
| 180 void OS::DebugBreak() { | 185 void OS::DebugBreak() { |
| 181 asm("int $3"); | 186 asm("int $3"); |
| 182 } | 187 } |
| 183 | 188 |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 911 | 916 |
| 912 | 917 |
| 913 void Sampler::Stop() { | 918 void Sampler::Stop() { |
| 914 ASSERT(IsActive()); | 919 ASSERT(IsActive()); |
| 915 SamplerThread::RemoveActiveSampler(this); | 920 SamplerThread::RemoveActiveSampler(this); |
| 916 SetActive(false); | 921 SetActive(false); |
| 917 } | 922 } |
| 918 | 923 |
| 919 | 924 |
| 920 } } // namespace v8::internal | 925 } } // namespace v8::internal |
| OLD | NEW |