Thread (7 messages) flat view 7 messages, 5 authors, 2013-02-26

Re: [PATCH] ptrace: add ability to retrieve signals without removing from a queue (v2)

From: Pavel Emelyanov <hidden>
Date: 2013-02-25 10:14:17
Also in: lkml

+	for (i = 0; i < arg.nr; i++) {
+		off = arg.off + i;
+
+		spin_lock_irq(&child->sighand->siglock);
+		list_for_each_entry(q, &pending->list, list) {
+			if (!off--) {
+				copy_siginfo(&info, &q->info);
+				break;
+			}
+		}
+		spin_unlock_irq(&child->sighand->siglock);
What's the point of arg.nr if you for every single siginfo drop the lock
and perform linear search anyway?

Thanks,
Pavel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help