From 7cecc5f97fb28126a7d930efe44d3a03a64ba272 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 18 Sep 2010 20:27:38 +0200 Subject: Fix net_bh_wakeup use * pfinet/sched.c (net_bh_worker): Use the net_bh_lock mutex instead of the global_lock mutex for the net_bh_wakeup condition variable. --- pfinet/sched.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pfinet/sched.c b/pfinet/sched.c index 6c6c8241..37e4ecbd 100644 --- a/pfinet/sched.c +++ b/pfinet/sched.c @@ -58,13 +58,13 @@ sock_wake_async (struct socket *sock, int how) any_t net_bh_worker (any_t arg) { - __mutex_lock (&global_lock); + __mutex_lock (&net_bh_lock); while (1) { - condition_wait (&net_bh_wakeup, &global_lock); - __mutex_lock (&net_bh_lock); + condition_wait (&net_bh_wakeup, &net_bh_lock); + __mutex_lock (&global_lock); net_bh (); - __mutex_unlock (&net_bh_lock); + __mutex_unlock (&global_lock); } /*NOTREACHED*/ return 0; -- cgit v1.2.3