Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F157369521
D40790.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D40790.diff
View Options
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -254,29 +254,6 @@
[SIGUSR2] = SIGPROP_KILL,
};
-#define _SIG_FOREACH_ADVANCE(i, set) ({ \
- int __found; \
- for (;;) { \
- if (__bits != 0) { \
- int __sig = ffs(__bits); \
- __bits &= ~(1u << (__sig - 1)); \
- sig = __i * sizeof((set)->__bits[0]) * NBBY + __sig; \
- __found = 1; \
- break; \
- } \
- if (++__i == _SIG_WORDS) { \
- __found = 0; \
- break; \
- } \
- __bits = (set)->__bits[__i]; \
- } \
- __found != 0; \
-})
-
-#define SIG_FOREACH(i, set) \
- for (int32_t __i = -1, __bits = 0; \
- _SIG_FOREACH_ADVANCE(i, set); ) \
-
static sigset_t fastblock_mask;
static void
diff --git a/sys/sys/signalvar.h b/sys/sys/signalvar.h
--- a/sys/sys/signalvar.h
+++ b/sys/sys/signalvar.h
@@ -35,6 +35,7 @@
#ifndef _SYS_SIGNALVAR_H_
#define _SYS_SIGNALVAR_H_
+#include <sys/types.h>
#include <sys/queue.h>
#include <sys/_lock.h>
#include <sys/_mutex.h>
@@ -297,6 +298,29 @@
return (true);
}
+#define _SIG_FOREACH_ADVANCE(i, set) ({ \
+ int __found; \
+ for (;;) { \
+ if (__bits != 0) { \
+ int __sig = ffs(__bits); \
+ __bits &= ~(1u << (__sig - 1)); \
+ sig = __i * sizeof((set)->__bits[0]) * NBBY + __sig; \
+ __found = 1; \
+ break; \
+ } \
+ if (++__i == _SIG_WORDS) { \
+ __found = 0; \
+ break; \
+ } \
+ __bits = (set)->__bits[__i]; \
+ } \
+ __found != 0; \
+})
+
+#define SIG_FOREACH(i, set) \
+ for (int32_t __i = -1, __bits = 0; \
+ _SIG_FOREACH_ADVANCE(i, set); ) \
+
#define ksiginfo_init(ksi) \
do { \
bzero(ksi, sizeof(ksiginfo_t)); \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 21, 5:09 PM (17 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33400278
Default Alt Text
D40790.diff (1 KB)
Attached To
Mode
D40790: kern_sig.c: Move SIG_FOREACH into signalvar.h
Attached
Detach File
Event Timeline
Log In to Comment