[Midnightbsd-cvs] src [12359] trunk/sys/sys/signalvar.h: sync with FreeBSD 11-stable
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Feb 9 13:28:48 EST 2020
Revision: 12359
http://svnweb.midnightbsd.org/src/?rev=12359
Author: laffer1
Date: 2020-02-09 13:28:48 -0500 (Sun, 09 Feb 2020)
Log Message:
-----------
sync with FreeBSD 11-stable
Modified Paths:
--------------
trunk/sys/sys/signalvar.h
Modified: trunk/sys/sys/signalvar.h
===================================================================
--- trunk/sys/sys/signalvar.h 2020-02-09 18:26:51 UTC (rev 12358)
+++ trunk/sys/sys/signalvar.h 2020-02-09 18:28:48 UTC (rev 12359)
@@ -28,7 +28,7 @@
* SUCH DAMAGE.
*
* @(#)signalvar.h 8.6 (Berkeley) 2/19/95
- * $FreeBSD: stable/10/sys/sys/signalvar.h 315949 2017-03-25 13:33:23Z badger $
+ * $FreeBSD: stable/11/sys/sys/signalvar.h 353789 2019-10-21 01:24:21Z kevans $
*/
#ifndef _SYS_SIGNALVAR_H_
@@ -200,6 +200,7 @@
return (1);
}
+#ifdef COMPAT_FREEBSD6
struct osigevent {
int sigev_notify; /* Notification type */
union {
@@ -208,6 +209,7 @@
} __sigev_u;
union sigval sigev_value; /* Signal value */
};
+#endif
typedef struct ksiginfo {
TAILQ_ENTRY(ksiginfo) ksi_link;
@@ -326,9 +328,41 @@
#define SIGPROCMASK_PROC_LOCKED 0x0002
#define SIGPROCMASK_PS_LOCKED 0x0004
+/*
+ * Modes for sigdeferstop(). Manages behaviour of
+ * thread_suspend_check() in the region delimited by
+ * sigdeferstop()/sigallowstop(). Must be restored to
+ * SIGDEFERSTOP_OFF before returning to userspace.
+ */
+#define SIGDEFERSTOP_NOP 0 /* continue doing whatever is done now */
+#define SIGDEFERSTOP_OFF 1 /* stop ignoring STOPs */
+#define SIGDEFERSTOP_SILENT 2 /* silently ignore STOPs */
+#define SIGDEFERSTOP_EINTR 3 /* ignore STOPs, return EINTR */
+#define SIGDEFERSTOP_ERESTART 4 /* ignore STOPs, return ERESTART */
+
+#define SIGDEFERSTOP_VAL_NCHG (-1) /* placeholder indicating no state change */
+int sigdeferstop_impl(int mode);
+void sigallowstop_impl(int prev);
+
+static inline int
+sigdeferstop(int mode)
+{
+
+ if (mode == SIGDEFERSTOP_NOP)
+ return (SIGDEFERSTOP_VAL_NCHG);
+ return (sigdeferstop_impl(mode));
+}
+
+static inline void
+sigallowstop(int prev)
+{
+
+ if (prev == SIGDEFERSTOP_VAL_NCHG)
+ return;
+ sigallowstop_impl(prev);
+}
+
int cursig(struct thread *td);
-int sigdeferstop(void);
-int sigallowstop(void);
void execsigs(struct proc *p);
void gsignal(int pgid, int sig, ksiginfo_t *ksi);
void killproc(struct proc *p, char *why);
@@ -346,6 +380,7 @@
void sigacts_free(struct sigacts *ps);
struct sigacts *sigacts_hold(struct sigacts *ps);
int sigacts_shared(struct sigacts *ps);
+void sig_drop_caught(struct proc *p);
void sigexit(struct thread *td, int sig) __dead2;
int sigev_findtd(struct proc *p, struct sigevent *sigev, struct thread **);
int sig_ffs(sigset_t *set);
More information about the Midnightbsd-cvs
mailing list