summaryrefslogtreecommitdiff
path: root/libports
diff options
context:
space:
mode:
authorDiego Nieto Cid <dnietoc@gmail.com>2011-10-30 18:07:02 -0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-11-15 00:15:59 +0100
commit9b5429e834cde56f73b8ff605e36afc7d9bb6e1b (patch)
treee3c6883e7e7d3a34c697d9b47fdf23f45d1e6c12 /libports
parentab5584af46001e8f9ceb1f9406c1da4b4df57d1d (diff)
Keep at least one request handler thread.
* libports/manage-multithread.c: Startover when no other thread is listenening for requests.
Diffstat (limited to 'libports')
-rw-r--r--libports/manage-multithread.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c
index 6ec1e49f..e95657e1 100644
--- a/libports/manage-multithread.c
+++ b/libports/manage-multithread.c
@@ -150,6 +150,11 @@ ports_manage_port_operations_multithread (struct port_bucket *bucket,
else
{
spin_lock (&lock);
+ if (nreqthreads == 1)
+ {
+ spin_unlock (&lock);
+ goto startover;
+ }
nreqthreads--;
totalthreads--;
spin_unlock (&lock);