Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24573
b: refs/heads/master
c: dac27f4
h: refs/heads/master
i:
  24571: e7c6893
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Mar 29, 2006
1 parent 0f961fa commit 9d53645
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a7e5328a06a2beee3a2bbfaf87ce2a7bbe937de1
refs/heads/master: dac27f4a09c274db048e80d2511102e540ac9e3a
32 changes: 8 additions & 24 deletions trunk/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1685,8 +1685,7 @@ finish_stop(int stop_count)
static int do_signal_stop(int signr)
{
struct signal_struct *sig = current->signal;
struct sighand_struct *sighand = current->sighand;
int stop_count = -1;
int stop_count;

if (!likely(sig->flags & SIGNAL_STOP_DEQUEUED))
return 0;
Expand All @@ -1696,30 +1695,14 @@ static int do_signal_stop(int signr)
* There is a group stop in progress. We don't need to
* start another one.
*/
signr = sig->group_exit_code;
stop_count = --sig->group_stop_count;
current->exit_code = signr;
set_current_state(TASK_STOPPED);
if (stop_count == 0)
sig->flags = SIGNAL_STOP_STOPPED;
}
else if (thread_group_empty(current)) {
/*
* Lock must be held through transition to stopped state.
*/
current->exit_code = current->signal->group_exit_code = signr;
set_current_state(TASK_STOPPED);
sig->flags = SIGNAL_STOP_STOPPED;
}
else {
} else {
/*
* (sig->group_stop_count == 0)
* There is no group stop already in progress.
* We must initiate one now.
*/
struct task_struct *t;

current->exit_code = signr;
sig->group_exit_code = signr;

stop_count = 0;
Expand All @@ -1735,13 +1718,14 @@ static int do_signal_stop(int signr)
signal_wake_up(t, 0);
}
sig->group_stop_count = stop_count;

set_current_state(TASK_STOPPED);
if (stop_count == 0)
sig->flags = SIGNAL_STOP_STOPPED;
}

spin_unlock_irq(&sighand->siglock);
if (stop_count == 0)
sig->flags = SIGNAL_STOP_STOPPED;
current->exit_code = sig->group_exit_code;
__set_current_state(TASK_STOPPED);

spin_unlock_irq(&current->sighand->siglock);
finish_stop(stop_count);
return 1;
}
Expand Down

0 comments on commit 9d53645

Please sign in to comment.