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-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // This file is implemented separately from sigaction.cpp so that we can
10 // strongly control the options this file is compiled with. __restore_rt cannot
11 // make any stack allocations so we must ensure this.
12 
13 #include "config/linux/syscall.h"
14 #include "include/sys/syscall.h"
15 
16 namespace __llvm_libc {
17 
18 extern "C" void __restore_rt()
19     __attribute__((no_sanitize("thread", "memory", "undefined", "fuzzer"),
20                    hidden));
21 
__restore_rt()22 extern "C" void __restore_rt() { __llvm_libc::syscall(SYS_rt_sigreturn); }
23 
24 } // namespace __llvm_libc
25