[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 02/15] _hurd_internal_post_signal: Scope variables more restricti
From: |
Jeremie Koenig |
Subject: |
[PATCH 02/15] _hurd_internal_post_signal: Scope variables more restrictively |
Date: |
Wed, 29 Jun 2011 18:30:14 +0200 |
* hurd/hurdsig.c (_hurd_internal_post_signal): Move the variable declarations
into the first-level inner functions which actually use them.
---
hurd/hurdsig.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/hurd/hurdsig.c b/hurd/hurdsig.c
index 63418ea..320cbe7 100644
--- a/hurd/hurdsig.c
+++ b/hurd/hurdsig.c
@@ -461,13 +461,6 @@ _hurd_internal_post_signal (struct hurd_sigstate *ss,
mach_msg_type_name_t reply_port_type,
int untraced)
{
- error_t err;
- struct machine_thread_all_state thread_state;
- enum { stop, ignore, core, term, handle } act;
- sighandler_t handler;
- sigset_t pending;
- int ss_suspended;
-
/* Reply to this sig_post message. */
__typeof (__msg_sig_post_reply) *reply_rpc
= (untraced ? __msg_sig_post_untraced_reply : __msg_sig_post_reply);
@@ -487,6 +480,9 @@ _hurd_internal_post_signal (struct hurd_sigstate *ss,
being traced, return 0 with SS unlocked. */
int post_signal (void)
{
+ struct machine_thread_all_state thread_state;
+ enum { stop, ignore, core, term, handle } act;
+ int ss_suspended;
/* Mark the signal as pending. */
void mark_pending (void)
@@ -551,6 +547,9 @@ int post_signal (void)
ss_suspended = 1;
}
+ error_t err;
+ sighandler_t handler;
+
if (signo == 0)
{
if (untraced)
@@ -975,6 +974,8 @@ int post_signal (void)
SS unlocked. */
int check_pending_signal (void)
{
+ sigset_t pending;
+
/* Return nonzero if SS has any signals pending we should worry about.
We don't worry about any pending signals if we are stopped, nor if
SS is in a critical section. We are guaranteed to get a sig_post
--
1.7.5.3
- [PATCH 00/15] Hurd signals: please review, Jeremie Koenig, 2011/06/29
- [PATCH 01/15] _hurd_internal_post_signal: Split into more functions, Jeremie Koenig, 2011/06/29
- [PATCH 02/15] _hurd_internal_post_signal: Scope variables more restrictively,
Jeremie Koenig <=
- [PATCH 06/15] Hurd signals: make sigsuspend POSIX-conformant., Jeremie Koenig, 2011/06/29
- [PATCH 05/15] Hurd signals: reindent, Jeremie Koenig, 2011/06/29
- [PATCH 08/15] Versions.def: add GLIBC_2.15, Jeremie Koenig, 2011/06/29
- [PATCH 10/15] Hurd signals: provide a sigstate destructor, Jeremie Koenig, 2011/06/29
- [PATCH 11/15] Hurd signals: fix sigwait() for global signals, Jeremie Koenig, 2011/06/29
- [PATCH 14/15] Hurd signals: SA_SIGINFO support, Jeremie Koenig, 2011/06/29
- [PATCH 13/15] Hurd signals: Copy bits/sigaction.h, Jeremie Koenig, 2011/06/29
- [PATCH 07/15] Hurd signals: fix uninitialized value., Jeremie Koenig, 2011/06/29
- [PATCH 04/15] Hurd signals: refactor check_pending_signals, Jeremie Koenig, 2011/06/29
- [PATCH 03/15] _hurd_internal_post_signal: Split out inner functions, Jeremie Koenig, 2011/06/29