Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-03-28 07:46:14

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #include "FpeMonitorPlatform.hpp"
0010 
0011 namespace ActsPlugins {
0012 
0013 // This backend intentionally provides a complete no-op implementation so the
0014 // public FpeMonitor API remains available even when platform trapping support
0015 // is missing.
0016 bool detail::isRuntimeSupported() {
0017   return false;
0018 }
0019 
0020 std::optional<FpeType> detail::decodeFpeType(int signal, const siginfo_t* si,
0021                                              void* ctx) {
0022   // No signal decoding support on unsupported platforms.
0023   static_cast<void>(signal);
0024   static_cast<void>(si);
0025   static_cast<void>(ctx);
0026   return std::nullopt;
0027 }
0028 
0029 // Trap-control hooks are intentionally inert.
0030 void detail::clearPendingExceptions(int excepts) {
0031   static_cast<void>(excepts);
0032 }
0033 
0034 void detail::enableExceptions(int excepts) {
0035   static_cast<void>(excepts);
0036 }
0037 
0038 void detail::disableExceptions(int excepts) {
0039   static_cast<void>(excepts);
0040 }
0041 
0042 void detail::maskTrapsInSignalContext(void* ctx, FpeType type) {
0043   // No context mutation possible without platform-specific register layout.
0044   static_cast<void>(ctx);
0045   static_cast<void>(type);
0046 }
0047 
0048 std::size_t detail::captureStackFromSignalContext(void* ctx, void* buffer,
0049                                                   std::size_t bufferBytes) {
0050   // No signal-context stack unwinding backend on unsupported platforms.
0051   static_cast<void>(ctx);
0052   static_cast<void>(buffer);
0053   static_cast<void>(bufferBytes);
0054   return 0;
0055 }
0056 
0057 // Keep defaults aligned with safe_dump fallback behavior.
0058 std::size_t detail::safeDumpSkipFrames() {
0059   return 2;
0060 }
0061 
0062 bool detail::shouldFailFastOnUnknownSignal() {
0063   return false;
0064 }
0065 
0066 void detail::installSignalHandlers(void (*handler)(int, siginfo_t*, void*)) {
0067   // Signal handler installation is intentionally disabled.
0068   static_cast<void>(handler);
0069 }
0070 
0071 }  // namespace ActsPlugins