diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-09-18 20:27:38 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2010-09-18 20:27:38 +0200 |
commit | 7cecc5f97fb28126a7d930efe44d3a03a64ba272 (patch) | |
tree | a33d3070e280a7d1394c9af409d7d3f551ff203c /pfinet | |
parent | e59f3c667db81b200991dfb264423d87820f7f2d (diff) | |
download | hurd-7cecc5f97fb28126a7d930efe44d3a03a64ba272.tar.gz hurd-7cecc5f97fb28126a7d930efe44d3a03a64ba272.tar.bz2 hurd-7cecc5f97fb28126a7d930efe44d3a03a64ba272.zip |
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')
-rw-r--r-- | pfinet/sched.c | 8 |
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; |