-
Couldn't load subscription status.
- Fork 15k
[libc] add SIG_HOLD for linux/gpu #165007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@llvm/pr-subscribers-libc Author: Connector Switch (c8ef) ChangesFull diff: https://github.com/llvm/llvm-project/pull/165007.diff 2 Files Affected:
diff --git a/libc/include/llvm-libc-macros/gpu/signal-macros.h b/libc/include/llvm-libc-macros/gpu/signal-macros.h
index f0d49ea34fe0e..4c458b7c2000e 100644
--- a/libc/include/llvm-libc-macros/gpu/signal-macros.h
+++ b/libc/include/llvm-libc-macros/gpu/signal-macros.h
@@ -16,9 +16,10 @@
#define SIGSEGV 11
#define SIGTERM 15
-#define SIG_DFL ((void (*)(int))(0))
-#define SIG_IGN ((void (*)(int))(1))
-#define SIG_ERR ((void (*)(int))(-1))
+#define SIG_ERR __LLVM_LIBC_CAST(reinterpret_cast, (void (*)(int)), -1)
+#define SIG_DFL __LLVM_LIBC_CAST(reinterpret_cast, (void (*)(int)), 0)
+#define SIG_IGN __LLVM_LIBC_CAST(reinterpret_cast, (void (*)(int)), 1)
+#define SIG_HOLD __LLVM_LIBC_CAST(reinterpret_cast, (void (*)(int)), 2)
// Max signal number
#define NSIG 64
diff --git a/libc/include/llvm-libc-macros/linux/signal-macros.h b/libc/include/llvm-libc-macros/linux/signal-macros.h
index d220241a38206..a010adef272d4 100644
--- a/libc/include/llvm-libc-macros/linux/signal-macros.h
+++ b/libc/include/llvm-libc-macros/linux/signal-macros.h
@@ -86,9 +86,10 @@
#error "Signal stack sizes not defined for your platform."
#endif
-#define SIG_DFL ((void (*)(int))0)
-#define SIG_IGN ((void (*)(int))1)
-#define SIG_ERR ((void (*)(int))(-1))
+#define SIG_ERR __LLVM_LIBC_CAST(reinterpret_cast, (void (*)(int)), -1)
+#define SIG_DFL __LLVM_LIBC_CAST(reinterpret_cast, (void (*)(int)), 0)
+#define SIG_IGN __LLVM_LIBC_CAST(reinterpret_cast, (void (*)(int)), 1)
+#define SIG_HOLD __LLVM_LIBC_CAST(reinterpret_cast, (void (*)(int)), 2)
// SIGCHLD si_codes
#define CLD_EXITED 1 // child has exited
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember why I defined these on the GPU, they probably don't work exactly. Might've just been to make some compilation happy.
|
Looks like the proxy header will not include the #include "src/signal/signal.h"
// vvv
#include "hdr/signal_macros.h"
// ^^^
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include "src/signal/sigaction.h" |
|
And I found a few occurances of |
|
Based on the discussion on Discord, we should make the headers that use |
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/10/builds/16120 Here is the relevant piece of the build log for the reference |
No description provided.