diff options
author | Thomas Bushnell <thomas@gnu.org> | 1997-08-20 18:19:39 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1997-08-20 18:19:39 +0000 |
commit | 9596c4ee221e90fa4d35255e290f3e6988756bd7 (patch) | |
tree | 48a3a0eb67885313c1d3bf664805c7ab740c15b0 /libports | |
parent | a553ffc7606c7f72d9a3e42c076a23a1f961d41b (diff) |
Wed Aug 20 13:56:40 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* manage-multithread.c (ports_manage_port_operations_multithread):
Drop parms `wire_cthreads' and `wire_threads'. Add parm `hook'.
(thread_function): Call HOOK instead of cthread_wire and/or
thread_wire.
* ports.h (ports_manage_port_operations_multithread): Adjust
declaration.
Diffstat (limited to 'libports')
-rw-r--r-- | libports/ChangeLog | 9 | ||||
-rw-r--r-- | libports/manage-multithread.c | 11 | ||||
-rw-r--r-- | libports/ports.h | 18 |
3 files changed, 20 insertions, 18 deletions
diff --git a/libports/ChangeLog b/libports/ChangeLog index db13aaf6..240b9faf 100644 --- a/libports/ChangeLog +++ b/libports/ChangeLog @@ -1,3 +1,12 @@ +Wed Aug 20 13:56:40 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> + + * manage-multithread.c (ports_manage_port_operations_multithread): + Drop parms `wire_cthreads' and `wire_threads'. Add parm `hook'. + (thread_function): Call HOOK instead of cthread_wire and/or + thread_wire. + * ports.h (ports_manage_port_operations_multithread): Adjust + declaration. + Fri Feb 14 00:51:32 1997 Miles Bader <miles@gnu.ai.mit.edu> * create-bucket.c (ports_create_bucket): Initialize rpcs, flags, & diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c index 2f3f344f..fb8f03f6 100644 --- a/libports/manage-multithread.c +++ b/libports/manage-multithread.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. Written by Michael I. Bushnell. This file is part of the GNU Hurd. @@ -29,8 +29,7 @@ ports_manage_port_operations_multithread (struct port_bucket *bucket, ports_demuxer_type demuxer, int thread_timeout, int global_timeout, - int wire_cthreads, - mach_port_t wire_threads) + void (*hook)()) { volatile int nreqthreads; volatile int totalthreads; @@ -123,10 +122,8 @@ ports_manage_port_operations_multithread (struct port_bucket *bucket, int timeout; error_t err; - if (wire_threads) - thread_wire (wire_threads, hurd_thread_self (), 1); - if (wire_cthreads) - cthread_wire (); + if (hook) + (*hook) (); if (master) timeout = global_timeout; diff --git a/libports/ports.h b/libports/ports.h index aba53a4d..1ab8855c 100644 --- a/libports/ports.h +++ b/libports/ports.h @@ -1,5 +1,5 @@ /* Ports library for server construction - Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. Written by Michael I. Bushnell. This file is part of the GNU Hurd. @@ -293,20 +293,16 @@ void ports_manage_port_operations_one_thread(struct port_bucket *bucket, for each incoming message. Return if GLOBAL_TIMEOUT is nonzero and no messages have been receieved for GLOBAL_TIMEOUT milliseconds. Create threads as necessary to handle incoming messages so that no - port is starved because of sluggishness on another port. All - threads created (and the calling thread) will be wired with - cthread_wire if WIRE_CTHREADS is non-zero. All threads created - (and the calling thread) will be wired with thread_wire if - WIRE_THREADS is non-zero (it must be the priviliged host port in - order to succeed). If LOCAL_TIMEOUT is non-zero, then individual - threads will die off if they handle no incoming messages for - LOCAL_TIMEOUT milliseconds. */ + port is starved because of sluggishness on another port. If + LOCAL_TIMEOUT is non-zero, then individual threads will die off if + they handle no incoming messages for LOCAL_TIMEOUT milliseconds. + HOOK (if not null) will be called in each new thread immediately + after it is created. */ void ports_manage_port_operations_multithread (struct port_bucket *bucket, ports_demuxer_type demuxer, int thread_timeout, int global_timeout, - int wire_cthreads, - mach_port_t wire_threads); + void (*hook)(void)); /* Interrupt any pending RPC on PORT. Wait for all pending RPC's to finish, and then block any new RPC's starting on that port. */ |