Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
emscripten-core
GitHub Repository: emscripten-core/emscripten
Path: blob/main/system/lib/llvm-libc/src/setjmp/siglongjmp.cpp
6174 views
1
//===-- Implementation of siglongjmp --------------------------------------===//
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
#include "src/setjmp/siglongjmp.h"
10
#include "src/__support/common.h"
11
#include "src/setjmp/longjmp.h"
12
13
namespace LIBC_NAMESPACE_DECL {
14
15
// siglongjmp is the same as longjmp. The additional recovery work is done in
16
// the epilogue of the sigsetjmp function.
17
// TODO: move this inside the TU of longjmp and making it an alias after
18
// sigsetjmp is implemented for all architectures.
19
LLVM_LIBC_FUNCTION(void, siglongjmp, (jmp_buf buf, int val)) {
20
return LIBC_NAMESPACE::longjmp(buf, val);
21
}
22
23
} // namespace LIBC_NAMESPACE_DECL
24
25