diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-11-21 15:05:42 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-11-21 15:05:42 +0000 |
commit | 2b1fd2332151eb00b5856f6ab218c1cba1437287 (patch) | |
tree | 4a4ae66f88739ed696268da662ee2047cdbc9abf | |
parent | af0218b4920aa13c23abd38fcbacfc525b8280a4 (diff) |
(ports_manage_port_operations_multithread): Lock _ports_lock around
new critical section.
-rw-r--r-- | libports/manage-multithread.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c index 26afa79a..9843b9c0 100644 --- a/libports/manage-multithread.c +++ b/libports/manage-multithread.c @@ -76,13 +76,18 @@ ports_manage_port_operations_multithread (struct port_bucket *bucket, if (pi) { ports_begin_rpc (pi, &link); + mutex_lock (&_ports_lock); if (inp->msgh_seqno < pi->cancel_threshhold) { cancel_rpc (inp, outp); status = 1; + mutex_unlock (&_ports_lock); } else - status = demuxer (inp, outp); + { + mutex_unlock (&_ports_lock); + status = demuxer (inp, outp); + } ports_end_rpc (pi, &link); ports_port_deref (pi); } |