For now the signal returned in cursig() is only set in p_siglist.
authorclaudio <claudio@openbsd.org>
Tue, 5 Oct 2021 08:38:19 +0000 (08:38 +0000)
committerclaudio <claudio@openbsd.org>
Tue, 5 Oct 2021 08:38:19 +0000 (08:38 +0000)
Simplify the code and remove the now unused CLRSIG() macro.
OK mpi@

sys/sys/signalvar.h
sys/ufs/mfs/mfs_vfsops.c

index fb97fb2..6fb4c8f 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: signalvar.h,v 1.48 2021/05/10 18:01:24 mpi Exp $      */
+/*     $OpenBSD: signalvar.h,v 1.49 2021/10/05 08:38:19 claudio Exp $  */
 /*     $NetBSD: signalvar.h,v 1.17 1996/04/22 01:23:31 christos Exp $  */
 
 /*
@@ -71,15 +71,6 @@ struct       sigacts {
 #define SIGPENDING(p)                                                  \
        (((p)->p_siglist | (p)->p_p->ps_siglist) & ~(p)->p_sigmask)
 
-/*
- * Clear a pending signal from a process.
- */
-#define CLRSIG(p, sig) do {                                            \
-       int __mask = sigmask(sig);                                      \
-       atomic_clearbits_int(&(p)->p_siglist, __mask);                  \
-       atomic_clearbits_int(&(p)->p_p->ps_siglist, __mask);            \
-} while (0)
-
 /*
  * Signal properties and actions.
  * The array below categorizes the signals and their default actions
index dca5fe3..5d1bd45 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: mfs_vfsops.c,v 1.60 2021/03/04 09:02:38 mpi Exp $     */
+/*     $OpenBSD: mfs_vfsops.c,v 1.61 2021/10/05 08:38:19 claudio Exp $ */
 /*     $NetBSD: mfs_vfsops.c,v 1.10 1996/02/09 22:31:28 christos Exp $ */
 
 /*
@@ -191,7 +191,8 @@ mfs_start(struct mount *mp, int flags, struct proc *p)
                        sig = cursig(p);
                        if (vfs_busy(mp, VB_WRITE|VB_NOWAIT) ||
                            dounmount(mp, (sig == SIGKILL) ? MNT_FORCE : 0, p))
-                               CLRSIG(p, sig);
+                               atomic_clearbits_int(&p->p_siglist,
+                                   sigmask(sig));
                        sleepreturn = 0;
                        continue;
                }