[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mig and send timeouts
From: |
Roland McGrath |
Subject: |
Re: mig and send timeouts |
Date: |
Wed, 19 Jun 2002 16:35:33 -0400 (EDT) |
> I checked how I can get the file_changed RPC to timeout quickly,
> and found that WaitTime is only for the receive operation.
Well, actually it is sort of for both. The mig waittime argument is passed
through to mach_msg's timeout argument, and having a waittime param causes
MACH_RCV_TIMEOUT bit to be set in the options. But (reading the mach_msg
man page), if the MACH_SEND_TIMEOUT bit is set, the timeout argument will
be used for that (first). So you could have a mig msgoption argument too
to make that happen.
You might also consider using MACH_SEND_NOTIFY instead. See the exception
forwarding in proc/mgt.c for an example, and read the mach_msg man page for
the details of what it does. With that, you could quench the new
notifications (i.e. remove that port from the list) until you get the
msg-accepted notification; that is an optimization to reduce/eliminate
server overhead when the client is blocked, you can also just safely ignore
the notification and just be prepared to ignore
MACH_SEND_NOTIFY_IN_PROGRESS.