blob: c2745309876aaa2c3d342c83e838b8224191d122 [file] [log] [blame]
Dmitriy Ivanovf57874d2014-10-07 13:43:23 -07001/*
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 Rogerscf7f1912014-10-22 22:06:39 -070017#include <stdio.h>
18#include <stdlib.h>
19
Josh Gaocca6fc02018-03-12 16:37:21 -070020#include "log.h"
Dmitriy Ivanovf57874d2014-10-07 13:43:23 -070021#include "sigchain.h"
22
Andreas Gampe9d9cfa82014-11-03 20:25:24 -080023#define ATTRIBUTE_UNUSED __attribute__((__unused__))
24
Andreas Gampeba1ff842015-04-06 14:33:54 -070025// We cannot annotate the declarations, as they are not no-return in the non-dummy version.
26#pragma GCC diagnostic push
27#pragma GCC diagnostic ignored "-Wunknown-pragmas"
28#pragma GCC diagnostic ignored "-Wmissing-noreturn"
29
Andreas Gampe277ccbd2014-11-03 21:36:10 -080030namespace art {
31
Josh Gao85a78cf2017-03-20 16:26:42 -070032extern "C" void EnsureFrontOfChain(int signal ATTRIBUTE_UNUSED) {
Mathieu Chartierd0004802014-10-15 16:59:47 -070033 log("EnsureFrontOfChain is not exported by the main executable.");
34 abort();
35}
Andreas Gampe277ccbd2014-11-03 21:36:10 -080036
Josh Gao85a78cf2017-03-20 16:26:42 -070037extern "C" void AddSpecialSignalHandlerFn(int signal ATTRIBUTE_UNUSED,
Josh Gao6b2018f2017-05-04 13:55:28 -070038 SigchainAction* sa ATTRIBUTE_UNUSED) {
Josh Gao85a78cf2017-03-20 16:26:42 -070039 log("SetSpecialSignalHandlerFn is not exported by the main executable.");
40 abort();
41}
42
43extern "C" void RemoveSpecialSignalHandlerFn(int signal ATTRIBUTE_UNUSED,
Josh Gao6b2018f2017-05-04 13:55:28 -070044 bool (*fn)(int, siginfo_t*, void*) ATTRIBUTE_UNUSED) {
Andreas Gampe03c2cc82015-05-22 18:31:50 -070045 log("SetSpecialSignalHandlerFn is not exported by the main executable.");
46 abort();
47}
48
Andreas Gampeba1ff842015-04-06 14:33:54 -070049#pragma GCC diagnostic pop
50
Andreas Gampe277ccbd2014-11-03 21:36:10 -080051} // namespace art