| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 | 175 |
| 176 void OS::Free(void* buf, const size_t length) { | 176 void OS::Free(void* buf, const size_t length) { |
| 177 // TODO(1240712): munmap has a return value which is ignored here. | 177 // TODO(1240712): munmap has a return value which is ignored here. |
| 178 int result = munmap(buf, length); | 178 int result = munmap(buf, length); |
| 179 USE(result); | 179 USE(result); |
| 180 ASSERT(result == 0); | 180 ASSERT(result == 0); |
| 181 } | 181 } |
| 182 | 182 |
| 183 | 183 |
| 184 void OS::Guard(void* address, const size_t size) { |
| 185 mprotect(address, size, PROT_NONE); |
| 186 } |
| 187 |
| 188 |
| 184 void OS::Sleep(int milliseconds) { | 189 void OS::Sleep(int milliseconds) { |
| 185 unsigned int ms = static_cast<unsigned int>(milliseconds); | 190 unsigned int ms = static_cast<unsigned int>(milliseconds); |
| 186 usleep(1000 * ms); | 191 usleep(1000 * ms); |
| 187 } | 192 } |
| 188 | 193 |
| 189 | 194 |
| 190 void OS::Abort() { | 195 void OS::Abort() { |
| 191 // Redirect to std abort to signal abnormal program termination. | 196 // Redirect to std abort to signal abnormal program termination. |
| 192 abort(); | 197 abort(); |
| 193 } | 198 } |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 | 797 |
| 793 | 798 |
| 794 void Sampler::Stop() { | 799 void Sampler::Stop() { |
| 795 ASSERT(IsActive()); | 800 ASSERT(IsActive()); |
| 796 SignalSender::RemoveActiveSampler(this); | 801 SignalSender::RemoveActiveSampler(this); |
| 797 SetActive(false); | 802 SetActive(false); |
| 798 } | 803 } |
| 799 | 804 |
| 800 | 805 |
| 801 } } // namespace v8::internal | 806 } } // namespace v8::internal |
| OLD | NEW |