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