Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Make sigispending() return the signal that is pendi...
details: https://anonhg.NetBSD.org/src/rev/22998744cd13
branches: trunk
changeset: 769104:22998744cd13
user: christos <christos%NetBSD.org@localhost>
date: Wed Aug 31 16:05:44 2011 +0000
description:
Make sigispending() return the signal that is pending, or 0. Fix the comment
that said that it returns true or false (it returned EINTR or 0 before).
Perhaps we should rename the function now?
diffstat:
sys/kern/kern_sig.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diffs (47 lines):
diff -r bbc651d67362 -r 22998744cd13 sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c Wed Aug 31 16:04:39 2011 +0000
+++ b/sys/kern/kern_sig.c Wed Aug 31 16:05:44 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_sig.c,v 1.310 2011/07/27 13:45:49 uebayasi Exp $ */
+/* $NetBSD: kern_sig.c,v 1.311 2011/08/31 16:05:44 christos Exp $ */
/*-
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.310 2011/07/27 13:45:49 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.311 2011/08/31 16:05:44 christos Exp $");
#include "opt_ptrace.h"
#include "opt_compat_sunos.h"
@@ -688,10 +688,10 @@
/*
* sigispending:
*
- * Return true if there are pending signals for the current LWP. May
- * be called unlocked provided that LW_PENDSIG is set, and that the
- * signal has been posted to the appopriate queue before LW_PENDSIG is
- * set.
+ * Return the first signal number if there are pending signals for the
+ * current LWP. May be called unlocked provided that LW_PENDSIG is set,
+ * and that the signal has been posted to the appopriate queue before
+ * LW_PENDSIG is set.
*/
int
sigispending(struct lwp *l, int signo)
@@ -707,10 +707,10 @@
sigminusset(&l->l_sigmask, &tset);
if (signo == 0) {
- if (firstsig(&tset) != 0)
- return EINTR;
+ if ((signo = firstsig(&tset)) != 0)
+ return signo;
} else if (sigismember(&tset, signo))
- return EINTR;
+ return signo;
return 0;
}
Home |
Main Index |
Thread Index |
Old Index