[libc-commits] [libc] [libc] implement sigsetjmp/siglongjmp for x86-64 (PR #136072)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Thu Apr 17 16:33:03 PDT 2025
================
@@ -0,0 +1,21 @@
+//===-- Implementation of siglongjmp --------------------------------------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#include "src/setjmp/siglongjmp.h"
+#include "src/__support/common.h"
+#include "src/setjmp/longjmp.h"
+
+namespace LIBC_NAMESPACE_DECL {
+
+// siglongjmp is the same as longjmp. The additional recovery work is done in
+// the epilogue of the sigsetjmp function.
+LLVM_LIBC_FUNCTION(void, siglongjmp, (jmp_buf buf, int val)) {
+ return longjmp(buf, val);
----------------
michaelrj-google wrote:
In that case, file an issue for that, add a TODO, and make sure this is calling the correctly namespaced version. This isn't ideal, but `setjmp` has always been a bit of a pain.
https://github.com/llvm/llvm-project/pull/136072
More information about the libc-commits
mailing list