Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37855
b: refs/heads/master
c: 5e6b3f4
h: refs/heads/master
i:
  37853: 5cd5ee4
  37851: 24125a2
  37847: fee948e
  37839: 80e0a87
  37823: 8c65def
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Oct 2, 2006
1 parent b5436bb commit d68823e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: 7fbaac005cab2f3b4d6999cdb32fb93d442c5cdb
refs/heads/master: 5e6b3f42edc20e988b186fbfb9eec174294222ea
11 changes: 5 additions & 6 deletions trunk/fs/proc/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ static void collect_sigign_sigcatch(struct task_struct *p, sigset_t *ign,

static inline char * task_sig(struct task_struct *p, char *buffer)
{
unsigned long flags;
sigset_t pending, shpending, blocked, ignored, caught;
int num_threads = 0;
unsigned long qsize = 0;
Expand All @@ -255,20 +256,18 @@ static inline char * task_sig(struct task_struct *p, char *buffer)
sigemptyset(&ignored);
sigemptyset(&caught);

/* Gather all the data with the appropriate locks held */
read_lock(&tasklist_lock);
if (p->sighand) {
spin_lock_irq(&p->sighand->siglock);
rcu_read_lock();
if (lock_task_sighand(p, &flags)) {
pending = p->pending.signal;
shpending = p->signal->shared_pending.signal;
blocked = p->blocked;
collect_sigign_sigcatch(p, &ignored, &caught);
num_threads = atomic_read(&p->signal->count);
qsize = atomic_read(&p->user->sigpending);
qlim = p->signal->rlim[RLIMIT_SIGPENDING].rlim_cur;
spin_unlock_irq(&p->sighand->siglock);
unlock_task_sighand(p, &flags);
}
read_unlock(&tasklist_lock);
rcu_read_unlock();

buffer += sprintf(buffer, "Threads:\t%d\n", num_threads);
buffer += sprintf(buffer, "SigQ:\t%lu/%lu\n", qsize, qlim);
Expand Down

0 comments on commit d68823e

Please sign in to comment.