[m-rev.] diff: conditionalize references to EINTR

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Nov 10 01:22:08 AEDT 2002


On 10-Nov-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> On 10-Nov-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> > On 10-Nov-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > > 
> > > Only refer to EINTR if it is defined.
> > > 
> > > runtime/mercury_std.h:
> > > 	Add a macro MR_is_eintr which tests whether its
> > > 	argument is EINTR, or returns false if EINTR
> > > 	not undefined.
> > > 
> > > trace/mercury_trace_internal.c:
> > > compiler/process_util.m:
> > > 	Use MR_is_eintr.
> > 
> > That looks good, thanks.
> > 
> > BTW it looks like your patch also included a bug fix which was
> > not mentioned in the log message:
> 
> That didn't actually fix a bug, I just thought it was clearer and
> less error-prone to initialize the variable where it was used.

I think it did fix a bug: if the time-out occurred, and then
the command was retried, the "MR_got_alarm" flag would never get
reset to false, so it would time out immediately.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list