Dmitriy Ivanov | f57874d | 2014-10-07 13:43:23 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Ian Rogers | cf7f191 | 2014-10-22 22:06:39 -0700 | [diff] [blame] | 17 | #include <stdio.h> |
| 18 | #include <stdlib.h> |
| 19 | |
Josh Gao | cca6fc0 | 2018-03-12 16:37:21 -0700 | [diff] [blame] | 20 | #include "log.h" |
Dmitriy Ivanov | f57874d | 2014-10-07 13:43:23 -0700 | [diff] [blame] | 21 | #include "sigchain.h" |
| 22 | |
Andreas Gampe | 9d9cfa8 | 2014-11-03 20:25:24 -0800 | [diff] [blame] | 23 | #define ATTRIBUTE_UNUSED __attribute__((__unused__)) |
| 24 | |
David Srbecky | d3ee902 | 2020-07-27 16:05:38 +0100 | [diff] [blame] | 25 | // We cannot annotate the declarations, as they are not no-return in the non-fake version. |
Andreas Gampe | ba1ff84 | 2015-04-06 14:33:54 -0700 | [diff] [blame] | 26 | #pragma GCC diagnostic push |
| 27 | #pragma GCC diagnostic ignored "-Wunknown-pragmas" |
| 28 | #pragma GCC diagnostic ignored "-Wmissing-noreturn" |
| 29 | |
Andreas Gampe | 277ccbd | 2014-11-03 21:36:10 -0800 | [diff] [blame] | 30 | namespace art { |
| 31 | |
Josh Gao | 85a78cf | 2017-03-20 16:26:42 -0700 | [diff] [blame] | 32 | extern "C" void EnsureFrontOfChain(int signal ATTRIBUTE_UNUSED) { |
Mathieu Chartier | d000480 | 2014-10-15 16:59:47 -0700 | [diff] [blame] | 33 | log("EnsureFrontOfChain is not exported by the main executable."); |
| 34 | abort(); |
| 35 | } |
Andreas Gampe | 277ccbd | 2014-11-03 21:36:10 -0800 | [diff] [blame] | 36 | |
Josh Gao | 85a78cf | 2017-03-20 16:26:42 -0700 | [diff] [blame] | 37 | extern "C" void AddSpecialSignalHandlerFn(int signal ATTRIBUTE_UNUSED, |
Josh Gao | 6b2018f | 2017-05-04 13:55:28 -0700 | [diff] [blame] | 38 | SigchainAction* sa ATTRIBUTE_UNUSED) { |
Josh Gao | 85a78cf | 2017-03-20 16:26:42 -0700 | [diff] [blame] | 39 | log("SetSpecialSignalHandlerFn is not exported by the main executable."); |
| 40 | abort(); |
| 41 | } |
| 42 | |
| 43 | extern "C" void RemoveSpecialSignalHandlerFn(int signal ATTRIBUTE_UNUSED, |
Josh Gao | 6b2018f | 2017-05-04 13:55:28 -0700 | [diff] [blame] | 44 | bool (*fn)(int, siginfo_t*, void*) ATTRIBUTE_UNUSED) { |
Andreas Gampe | 03c2cc8 | 2015-05-22 18:31:50 -0700 | [diff] [blame] | 45 | log("SetSpecialSignalHandlerFn is not exported by the main executable."); |
| 46 | abort(); |
| 47 | } |
| 48 | |
randy.jeong | ac2260a | 2019-05-27 10:29:09 +0900 | [diff] [blame] | 49 | extern "C" void SkipAddSignalHandler(bool value ATTRIBUTE_UNUSED) { |
| 50 | log("SkipAddSignalHandler is not exported by the main executable."); |
| 51 | abort(); |
| 52 | } |
| 53 | |
Andreas Gampe | ba1ff84 | 2015-04-06 14:33:54 -0700 | [diff] [blame] | 54 | #pragma GCC diagnostic pop |
| 55 | |
Andreas Gampe | 277ccbd | 2014-11-03 21:36:10 -0800 | [diff] [blame] | 56 | } // namespace art |