brintos

brintos / llvm-project-archived public Read only

0
0
Text · 948 B · d3b4240 Raw
29 lines · cpp
1//===-- Linux implementation of __restore_rt ------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// This file is implemented separately from sigaction.cpp so that we can10// strongly control the options this file is compiled with. __restore_rt cannot11// make any stack allocations so we must ensure this.12 13#include "src/__support/OSUtil/syscall.h"14#include "src/__support/macros/config.h"15 16#include <sys/syscall.h>17 18namespace LIBC_NAMESPACE_DECL {19 20extern "C" void __restore_rt()21    __attribute__((no_sanitize("all"),22                   hidden));23 24extern "C" void __restore_rt() {25  LIBC_NAMESPACE::syscall_impl<long>(SYS_rt_sigreturn);26}27 28} // namespace LIBC_NAMESPACE_DECL29