chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH 1/2] tcp: disable interrupts


From: Felix
Subject: Re: [Chicken-hackers] [PATCH 1/2] tcp: disable interrupts
Date: Sat, 16 Mar 2013 22:37:20 +0100 (CET)

From: Florian Zumbiehl <address@hidden>
Subject: [Chicken-hackers] [PATCH 1/2] tcp: disable interrupts
Date: Sat, 16 Mar 2013 17:56:41 +0100

> Add (declare (disable-interrupts)) to tcp so that errno doesn't get changed at
> inappropriate points during execution.
> ---
> 
> I don't really have a clue whether this is the correct way to do it, but
> the code that was breaking before is not breaking anymore with this patch
> applied ...

I'm not 100% sure about this. Send/receive of large amounts of data
will not be interrupted by the scheduler with timer-interrupts
disabled (the code will invoke the scheduler manually, but only if the
read/write operations fail due to blocking or interrupted system
calls). On the other hand adding the declarations will make the
behaviour certainly more deterministic and might avoid hidden race
conditions.


cheers,
felix



reply via email to

[Prev in Thread] Current Thread [Next in Thread]