summaryrefslogtreecommitdiff
path: root/libc/src/signal/linux/__restore.cpp
blob: f73c1b7296ac09a63d54c5c489a7332ada3c72db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
//===-- Linux implementation of __restore_rt ------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

// This file is implemented separately from sigaction.cpp so that we can
// strongly control the options this file is compiled with. __restore_rt cannot
// make any stack allocations so we must ensure this.

#include "include/sys/syscall.h"
#include "src/__support/OSUtil/syscall.h"

namespace __llvm_libc {

extern "C" void __restore_rt()
    __attribute__((no_sanitize("all"),
                   hidden));

extern "C" void __restore_rt() { __llvm_libc::syscall_impl(SYS_rt_sigreturn); }

} // namespace __llvm_libc