summaryrefslogtreecommitdiff
path: root/libports/inhibit-all-rpcs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libports/inhibit-all-rpcs.c')
-rw-r--r--libports/inhibit-all-rpcs.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/libports/inhibit-all-rpcs.c b/libports/inhibit-all-rpcs.c
index 9efb3c2f..9a72f83e 100644
--- a/libports/inhibit-all-rpcs.c
+++ b/libports/inhibit-all-rpcs.c
@@ -36,27 +36,26 @@ ports_inhibit_all_rpcs ()
{
struct port_bucket *bucket;
int this_one = 0;
- error_t interruptor (void *portstruct)
- {
- struct rpc_info *rpc;
- struct port_info *pi = portstruct;
- for (rpc = pi->current_rpcs; rpc; rpc = rpc->next)
+ for (bucket = _ports_all_buckets; bucket; bucket = bucket->next)
+ {
+ HURD_IHASH_ITERATE (&bucket->htable, portstruct)
{
- /* Avoid cancelling the calling thread if it's currently
- handling a RPC. */
- if (rpc->thread == hurd_thread_self ())
- this_one = 1;
- else
- hurd_thread_cancel (rpc->thread);
+ struct rpc_info *rpc;
+ struct port_info *pi = portstruct;
+
+ for (rpc = pi->current_rpcs; rpc; rpc = rpc->next)
+ {
+ /* Avoid cancelling the calling thread if it's currently
+ handling a RPC. */
+ if (rpc->thread == hurd_thread_self ())
+ this_one = 1;
+ else
+ hurd_thread_cancel (rpc->thread);
+ }
}
-
- return 0;
}
- for (bucket = _ports_all_buckets; bucket; bucket = bucket->next)
- ihash_iterate (bucket->htable, interruptor);
-
while (_ports_total_rpcs > this_one)
{
_ports_flags |= _PORTS_INHIBIT_WAIT;