summaryrefslogtreecommitdiff
path: root/pfinet/sched.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2010-09-18 20:27:38 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2010-09-18 20:27:38 +0200
commit7cecc5f97fb28126a7d930efe44d3a03a64ba272 (patch)
treea33d3070e280a7d1394c9af409d7d3f551ff203c /pfinet/sched.c
parente59f3c667db81b200991dfb264423d87820f7f2d (diff)
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.
Diffstat (limited to 'pfinet/sched.c')
-rw-r--r--pfinet/sched.c8
1 files 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;