summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblambert <blambert@openbsd.org>2008-09-10 12:30:40 +0000
committerblambert <blambert@openbsd.org>2008-09-10 12:30:40 +0000
commit3ff9b956b4d68accb9c15fdb18c8c94fca244ea8 (patch)
tree8fc57180cb8d8a1684c6f2471162d8d04d5ad7e7
parenticmp_reflect reuses mbufs. call pf_pkt_addr_changed to clear the state (diff)
downloadwireguard-openbsd-3ff9b956b4d68accb9c15fdb18c8c94fca244ea8.tar.xz
wireguard-openbsd-3ff9b956b4d68accb9c15fdb18c8c94fca244ea8.zip
There's no need to fully traverse the wakeup queue when waking a specific
process sleeping on a unique address (wakeup -> wakeup_one) ok guenther@, tedu@, art@
-rw-r--r--sys/kern/kern_synch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 822239c5ed9..650b35e722f 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_synch.c,v 1.86 2008/09/05 14:38:15 oga Exp $ */
+/* $OpenBSD: kern_synch.c,v 1.87 2008/09/10 12:30:40 blambert Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*
@@ -446,10 +446,10 @@ sys_thrwakeup(struct proc *p, void *v, register_t *retval)
int n = SCARG(uap, n);
struct proc *q;
int found = 0;
-
+
TAILQ_FOREACH(q, &p->p_p->ps_threads, p_thr_link) {
if (q->p_thrslpid == ident) {
- wakeup(&q->p_thrslpid);
+ wakeup_one(&q->p_thrslpid);
q->p_thrslpid = 0;
if (++found == n)
return (0);