| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/thread.h" | 5 #include "platform/thread.h" |
| 6 #include "vm/globals.h" | 6 #include "vm/globals.h" |
| 7 #include "vm/signal_handler.h" | 7 #include "vm/signal_handler.h" |
| 8 #if defined(TARGET_OS_ANDROID) | 8 #if defined(TARGET_OS_ANDROID) |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 uintptr_t SignalHandler::GetStackPointer(const mcontext_t& mcontext) { | 22 uintptr_t SignalHandler::GetStackPointer(const mcontext_t& mcontext) { |
| 23 UNIMPLEMENTED(); | 23 UNIMPLEMENTED(); |
| 24 } | 24 } |
| 25 | 25 |
| 26 | 26 |
| 27 void SignalHandler::Install(SignalAction action) { | 27 void SignalHandler::Install(SignalAction action) { |
| 28 UNIMPLEMENTED(); | 28 UNIMPLEMENTED(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 | 31 |
| 32 ScopedSignalBlocker::ScopedSignalBlocker() { | |
| 33 sigset_t set; | |
| 34 sigemptyset(&set); | |
| 35 sigaddset(&set, SIGPROF); | |
| 36 pthread_sigmask(SIG_SETMASK, &set, &old_); | |
| 37 } | |
| 38 | |
| 39 | |
| 40 ScopedSignalBlocker::~ScopedSignalBlocker() { | |
| 41 pthread_sigmask(SIG_SETMASK, &old_, NULL); | |
| 42 } | |
| 43 | |
| 44 } // namespace dart | 32 } // namespace dart |
| 45 | 33 |
| 46 #endif // defined(TARGET_OS_ANDROID) | 34 #endif // defined(TARGET_OS_ANDROID) |
| OLD | NEW |